hi all,
i made a "voltmeter" circuit for 16f676 and tried to program it for a 3 digit 7 segment common anode display. i used gcbide to program it.
the result was strange and flickering display at first, then all segments gone high as "8.8.8." including decimal points.
then i erased the program from pic and all displays gone low
i know i am not good at electronics, maybe i killed the pic. how i can be sure about that?, please help me.
here is the shematic:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Nice to see a real schematic show up on the forums, very nice!
A couple of things stand out here:
1) The inbuilt library is for a common cathode display, so unless you have accounted for that in code, the 8.8.8. is what you would expect on startup (i.e. the ports are cleared on initialization). The easiest way to do this without messing with the 7segment.h library would be to re-initialize the ports to display ports/segments to 1's
PortC = 255
Set PortA.1 ON
Set PortA.2 On
Then be sure to invert the display digit numbers before sending them to DisplayValue display ,data. One way would be to:
2) It would do well to keep the voltage divider input off the ICSPDAT line, same goes for the ICSPCLK line. It could be interfering with programming.
If more than 5.5-6V was allowed in on the voltage divider, then an individual pin could be blown. Check by trying a blinky led on this line to be sure it works. If the chip is warm or hot (at a low load) could also signal the chips demise.
I just happened to do this very same project and by luck I had a common cathode display, and an 18 pin device that can dedicate a PORT to the segments, good luck.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
notes:
*the source needs to edit for calibration. (short circuit destroyed my chip because i tried 25V for calibration)
*the 7segmentCA.h file edited by me for numerals only. you can change alphanumeric display values by this formula:
CA value=255-CC value (for ex. 199 =A for CC then 255-119=136 for CA)
*you have to rename 7segmentCA.h to 7segment.h before compiling (don't forget to back up original one)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi all,
i made a "voltmeter" circuit for 16f676 and tried to program it for a 3 digit 7 segment common anode display. i used gcbide to program it.
the result was strange and flickering display at first, then all segments gone high as "8.8.8." including decimal points.
then i erased the program from pic and all displays gone low
i know i am not good at electronics, maybe i killed the pic. how i can be sure about that?, please help me.
here is the shematic:
Nice to see a real schematic show up on the forums, very nice!
A couple of things stand out here:
1) The inbuilt library is for a common cathode display, so unless you have accounted for that in code, the 8.8.8. is what you would expect on startup (i.e. the ports are cleared on initialization). The easiest way to do this without messing with the 7segment.h library would be to re-initialize the ports to display ports/segments to 1's
Then be sure to invert the display digit numbers before sending them to DisplayValue display ,data. One way would be to:
2) It would do well to keep the voltage divider input off the ICSPDAT line, same goes for the ICSPCLK line. It could be interfering with programming.
If more than 5.5-6V was allowed in on the voltage divider, then an individual pin could be blown. Check by trying a blinky led on this line to be sure it works. If the chip is warm or hot (at a low load) could also signal the chips demise.
I just happened to do this very same project and by luck I had a common cathode display, and an 18 pin device that can dedicate a PORT to the segments, good luck.
thanks for the reply,
i found the problem: power suply , which is just simple unregulated 9v adapter.
then i got better power suply but there were negative digits at first as you warned (for ex.: "E" for "1")
finally i got correct digits by editing 7segment.h file.
now, time to calibrate,
thank you again
by the way finally i burned the chip by short circuit on 7805 :(
anyway, i want to publish source code and common anode .h files:
http://dl.dropbox.com/u/26934738/pic16f676voltmeter.zip
notes:
*the source needs to edit for calibration. (short circuit destroyed my chip because i tried 25V for calibration)
*the 7segmentCA.h file edited by me for numerals only. you can change alphanumeric display values by this formula:
CA value=255-CC value (for ex. 199 =A for CC then 255-119=136 for CA)
*you have to rename 7segmentCA.h to 7segment.h before compiling (don't forget to back up original one)
Hello All,
Please help me to build a volt meter using pic micro controller
What kind of help do you need?
What problems hare you having?