Tag Archives: PICkit 2

Minimum Viable Program for PIC12LF1572

Kevin Chubb (currently a final-year project student here in DIT) is designing a tiny robot using Microchip’s compact PIC12LF1572 microcontroller. It’s an interesting chip and Kevin’s doing great things with it. I decided to strip back one of the example … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , | 6 Comments

Generating antiphase PWM signals with the dsPIC30F4011

I frequently receive queries from people who are using a dsPIC microcontroller to control power electronics of some kind, such as in an inverter, a voltage converter, or similar. Many of these queries relate to the generation of different combinations … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 3 Comments

Programming the PIC16F819 on an LCD03 adapter using a PICkit 2

I was looking around the office for a PIC16F microcontroller to try out some sample code, but I couldn’t find any lying around. My colleague Richard Hayes gave me a little circuit board which is an adapter for serial to … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Simple dsPIC33FJ32MC202 example

This is a very simple example circuit and C program for Microchip’s dsPIC33FJ32MC202 microcontroller. The basic circuit used to connect the PICkit 2 to the dsPIC33FJ32MC202 is shown below. One thing that confused me when I tried to wire this … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 19 Comments

Working dsPIC30f4011 code to control servo angle from PC via serial

Here’s a working example of servo angle control from the PC, via serial communication to the dsPIC30F4011. The servo angle is set using a 5 character long command: The first character is ‘s’. The remaining four characters, which must all … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , | 2 Comments

dsPIC Workshop: Digital i/o, timing, PWM, UART

Today’s dsPIC programming workshop will take place from 2-4pm  in room KEG-036, DIT Kevin St. Conall O’Griofa will be co-presenting and Damon Berry will hopefully be helping out too. We’ll be using the following hardware: Laptops, PICkit 2, breadboard, dsPIC30F4011, … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | 1 Comment

PWM generation with the dsPIC30F4011

This is a simple example of PWM waveform generation using the dsPIC30F4011 microcontroller. This chip has three PWM channels (pins 33-38), each channel consisting of a pair of pins which can be configured in various ways. The code below enables … Continue reading

Posted in Uncategorized | Tagged , , , , | 1 Comment

Printing text from the dsPIC30F4011 to a PC via UART

This is a simple example of sending text from a dsPIC30F4011 microcontroller to a PC via the UART. This program toggles an LED on RD0 once every second. Each time the LED is switched on or off, the word “Hello” … Continue reading

Posted in Uncategorized | Tagged , , , | 12 Comments

dsPIC Programming Workshop

Introduction This workshop on dsPIC programming took place in room KEG-009 (DIT Kevin St) from 2-4pm on Wednesday 1-8-2012. Thanks to all those who participated. Here’s what we covered: We found out what software you need to install to get … Continue reading

Posted in PIC | Tagged , , , , , , | Leave a comment

PWM output on 2 channels of the dsPIC30F4011 with equal duty cycle and 180 degrees out of phase

Reader Mo Hsen wrote in with an interesting query about generating PWM output from the dsPIC30F4011 on two channels with equal duty cycle but 180 degrees out of phase (see the waveforms below for an example). I’ve created a short … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , | 50 Comments