Tag Archives: PICkit 2

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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 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 , , , , , , , , , | 13 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 , , , , | Leave a 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 , , , | 5 Comments