Saturday, January 7, 2012

Code used to fine tune the Analog circuit

Code I use to calibrate the ultrasonic sensor and debug the analog part of the circuit which is made of 3 Op Amps in Non-Inverting Amplifier configuration with an Op Amp as voltage follower in its first stage.  The PIC outputs the data through its USART which is connected to the development board to the RC6 pin.  The development board is in turn connected to the serial port/RS-232 of the computer where which it is logged using the USART Terminal of the mikro C PRO compiler and saved as a text file.  Any other communication program understanding the serial port would do the job.






Below is the sample output of the above program graphed using Excel spreadsheet.



No comments:

Post a Comment