There is a file on the microchip website entitled "Care and feeding of the PIC16c74 and its peripherals". In it is code doing all of the above except the display ( but it does send it via the SCI) This page demonstrates A/D, PWM and comms as you have requested. ----- Original Message ----- From: RAYMOND WILLCOX To: Sent: Wednesday, May 10, 2000 9:23 AM Subject: 16F873 A/D & PWM code wanted > Hi all > I would like to read a varying input voltage from a 10K pot(+5Vdd to > GND), display it on 2 - 7 segment displays, and vary the PWM output from 0 > to 50%(or greater) duty cycle. > The display need only show the voltage from the pot in unit and decimal > form. Example: 1.0V, 1.2V, 1.5V, 2.0V, 2.5V, etc.. The PWM output should > track the displayed voltage. > So far I have a rudimentary code that reads the pot and displays the > level on portc in binary. I have added a lookup table to run one 7-segment > display. I don't know how to use the PWM yet. Any help will be greatly > appreciated. Thanks in advance, Mark Willcox > > > > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com