Tag Archives: C code

Analog-to-PWM Conversion with the PIC18f4620

The main function below is reproduced with the kind permission of Robert Byrne who is using it in an Instrumentation project. His program is an adaptation of my PIC18F4620 template code that I posted recently, so to form a complete … Continue reading

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

Template Code for the PIC18F4620

I’m writing a new template program for the PIC18F4620, for use in our RoboSumo module and other projects. The template program basically sets up a few frequently used features – e.g. digital inputs, digital outputs, analog inputs, serial communication, PWM … Continue reading

Posted in PIC | Tagged , , , , , , , , , | 4 Comments

Analog input on the dsPIC30F4011

The following example program demonstrates basic analog input on the dsPIC30F4011. Only one of the ADC module’s four converters is used (AD0) and only one channel at a time is read. The sampling time is controlled manually and is currently … Continue reading

Posted in PIC | Tagged , , , , , , | 11 Comments