Pic chips - 12f675
Discussion
I know in the great PH world there is someone who knows this.
I know there are good sites on the net for this but I need the full hex including the configuration bits for a 12f675 or 16f628 to flash an led on any pin.
I cannot work out if the problem is the config bit or the programmer or connections or me!?!!?
connected thus.
+5-----| |---- 0v
-|<|---| |
.......| |
.......| |
12f675.
Please help I am going mad.
Hex (program written in mikropascal turns all pins on waits 1sec turns off and repeats)
:1000000002EFFF3F00F0FF3F039C038A856AFF0E6B
:10001000039A056E060E506EFF0E516EFF0E526E65
:10002000502E09EF0DEF512E00F00BEF00F00CEF0A
:10003000522E00F00BEF00F009EF08EF00F01A0E5F
:1000400000F0506E00F0FF0E516E502E10EF12EFC8
:10005000512E00F010EF00F00FEF420E00F0506E46
:1000600000F0502E13EF056A060E00F0506EFF0EE2
:10007000516EFF0E526E502E19EF1CEF512E00F0F4
:100080001AEF00F01CEF522E00F01AEF00F019EFFB
:1000900017EF00F01A0E00F0506E00F0FF0E516ED8
:1000A000502E20EF21EF512E00F020EF00F01EEF38
:1000B000420E00F0506E00F0502E22EF03EF24EFBE
:1000C00000F000F000F0FF3FFF3FFF3FFF3FFF3F2A
:02400E00E43F8D
:00000001FF
I know there are good sites on the net for this but I need the full hex including the configuration bits for a 12f675 or 16f628 to flash an led on any pin.
I cannot work out if the problem is the config bit or the programmer or connections or me!?!!?
connected thus.
+5-----| |---- 0v
-|<|---| |
.......| |
.......| |
12f675.
Please help I am going mad.
Hex (program written in mikropascal turns all pins on waits 1sec turns off and repeats)
:1000000002EFFF3F00F0FF3F039C038A856AFF0E6B
:10001000039A056E060E506EFF0E516EFF0E526E65
:10002000502E09EF0DEF512E00F00BEF00F00CEF0A
:10003000522E00F00BEF00F009EF08EF00F01A0E5F
:1000400000F0506E00F0FF0E516E502E10EF12EFC8
:10005000512E00F010EF00F00FEF420E00F0506E46
:1000600000F0502E13EF056A060E00F0506EFF0EE2
:10007000516EFF0E526E502E19EF1CEF512E00F0F4
:100080001AEF00F01CEF522E00F01AEF00F019EFFB
:1000900017EF00F01A0E00F0506E00F0FF0E516ED8
:1000A000502E20EF21EF512E00F020EF00F01EEF38
:1000B000420E00F0506E00F0502E22EF03EF24EFBE
:1000C00000F000F000F0FF3FFF3FFF3FFF3FFF3F2A
:02400E00E43F8D
:00000001FF
Edited by scared but happy on Friday 17th November 18:01
I have the code to flash a 12F683 if you would like that. I'm not sure what the detailed differences are. This toggles Pin 7. 4 times (2 flashes) a sec.
:020000040000FA
:020000000528D1
:06000A00831203138501BF
:1000100007309900831603139F013F308500850147
:1000200005141520051015201028A00B1528A10B6C
:040030001528080087
:040034000034003460
:02400E00C430BC
:00000001FF
I have never used Mikropascal, but comparing your code size to mine I would recommend you learn PIC12 assembler! Before you try this hex though, try connecting to the LED between +5v and the I/O pin via a 470ohm (ish) resistor, or buffer the output with an NPN transistor and pullup resistor. It seems that some devices just cannot source the current and are more like an open-collector output.
P.S. Yes, the power pins are on the opposite sides to almost every other chip ever.
:020000040000FA
:020000000528D1
:06000A00831203138501BF
:1000100007309900831603139F013F308500850147
:1000200005141520051015201028A00B1528A10B6C
:040030001528080087
:040034000034003460
:02400E00C430BC
:00000001FF
I have never used Mikropascal, but comparing your code size to mine I would recommend you learn PIC12 assembler! Before you try this hex though, try connecting to the LED between +5v and the I/O pin via a 470ohm (ish) resistor, or buffer the output with an NPN transistor and pullup resistor. It seems that some devices just cannot source the current and are more like an open-collector output.
P.S. Yes, the power pins are on the opposite sides to almost every other chip ever.
Thanks for that. The unit has been sitting on the self for a while and I need to do some programming for it for a small project.
I do know some pic assember but just needed some fully working code. I think its the programmer up the creek as I have tried 4 pics, 2 computers, various versions of MPLAB. Will have a bash tomorrow. Thanks.
I have already cooked one IC by forgetting the 'reversed' connections (still have the burn mark on my finger).
I do know some pic assember but just needed some fully working code. I think its the programmer up the creek as I have tried 4 pics, 2 computers, various versions of MPLAB. Will have a bash tomorrow. Thanks.
I have already cooked one IC by forgetting the 'reversed' connections (still have the burn mark on my finger).
You have probably tried these things, but its worth mentioning:
* Metering the output pins (remember pin 4 is input only) to see if anything is coming out.
* Don't forget you have to turn the comparator and ADC inputs *off* before setting the TRIS register. For some reason the hardware boots up with comparators and ADCs connected rather than digital I/O.
(As you can probably tell, I'm going through this, trying to code my own Christmas lights controller)
* Metering the output pins (remember pin 4 is input only) to see if anything is coming out.
* Don't forget you have to turn the comparator and ADC inputs *off* before setting the TRIS register. For some reason the hardware boots up with comparators and ADCs connected rather than digital I/O.
(As you can probably tell, I'm going through this, trying to code my own Christmas lights controller)
Thanks for help. Oh yes, the comparators, I remember that problem with the 16f628's. Nice of them to put it in big writing
. Took me flipping ages to sus that one.
Anyhow it looks like the programmer is knacked. Never mind xmas soon.
. Took me flipping ages to sus that one. Anyhow it looks like the programmer is knacked. Never mind xmas soon.
Edited by scared but happy on Saturday 18th November 18:53
Thats a b*gger
Maybe a cheap one off ebay would be better, there isn't really a lot to the electronics side of things anyway (unless you go for a USB based one). It could be something trivial like the clock or vdd/vpp trigger wire has broken in the cable. Ho hum, bit of a pain though!
Maybe a cheap one off ebay would be better, there isn't really a lot to the electronics side of things anyway (unless you go for a USB based one). It could be something trivial like the clock or vdd/vpp trigger wire has broken in the cable. Ho hum, bit of a pain though!
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff



k all happens.