I have a schematic for a police flasher routine for a model car but no hex code can anyone out there help a complete beginner with this? I want to flash 2 pairs of led's separately until power is stopped
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you writing the program with the icons in GCGB, or by writing text code?
Either way, if you just want a sequence of lights this should be pretty straightforward. Tell the compiler what chip model you're using, then use a combination of Set commands to turn things on and off, and Wait commands to create pauses in the sequence. Put all of the Set and Wait commands inside of a Do loop so that the sequence is repeated over and over, and you're done!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the info and quick reply . another problem I have is on the breadboard when I connect the 2 22pF caps to the crystal the chip stops and when I remove them the chip starts working again any ideas? I am using a 16f84a and 4 led's with a 5v power supply at 300mA
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How fast is the crystal? I can't see why adding the 22pf capacitors would stop it from working, are you sure that you are connecting them in the right place? The other thing to do (if you haven't already) is to attach a 10k resistor from MCLR to 5V.
Another option is to use another chip (if you can). The 16F84a is a very old chip now, and newer ones like the 16F628a, 16F819 or 16F88 all have the same pinout but can run without a crystal or a pullup resistor on MCLR. Just put a stable 5V in, and they run.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry it has taken so long to get back on the forum but that four letter word (work ) got in the way.
I am almost sure i am putting the caps in the right place I have read and re-read the instructions, I am using a 4Mhz crystal . I will try a 16f628a chip and see how that goes . At the momment it works ok without the caps and the pullup resistor but I don't know what damage I will do later when I try and solder it on to a board!!
Any way just thought I would let you know that I love this forum and even though I am an old guy I feel that I am beginning to understand this pic Thing :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a schematic for a police flasher routine for a model car but no hex code can anyone out there help a complete beginner with this? I want to flash 2 pairs of led's separately until power is stopped
Are you writing the program with the icons in GCGB, or by writing text code?
Either way, if you just want a sequence of lights this should be pretty straightforward. Tell the compiler what chip model you're using, then use a combination of Set commands to turn things on and off, and Wait commands to create pauses in the sequence. Put all of the Set and Wait commands inside of a Do loop so that the sequence is repeated over and over, and you're done!
Thank you for the info and quick reply . another problem I have is on the breadboard when I connect the 2 22pF caps to the crystal the chip stops and when I remove them the chip starts working again any ideas? I am using a 16f84a and 4 led's with a 5v power supply at 300mA
How fast is the crystal? I can't see why adding the 22pf capacitors would stop it from working, are you sure that you are connecting them in the right place? The other thing to do (if you haven't already) is to attach a 10k resistor from MCLR to 5V.
Another option is to use another chip (if you can). The 16F84a is a very old chip now, and newer ones like the 16F628a, 16F819 or 16F88 all have the same pinout but can run without a crystal or a pullup resistor on MCLR. Just put a stable 5V in, and they run.
Sorry it has taken so long to get back on the forum but that four letter word (work ) got in the way.
I am almost sure i am putting the caps in the right place I have read and re-read the instructions, I am using a 4Mhz crystal . I will try a 16f628a chip and see how that goes . At the momment it works ok without the caps and the pullup resistor but I don't know what damage I will do later when I try and solder it on to a board!!
Any way just thought I would let you know that I love this forum and even though I am an old guy I feel that I am beginning to understand this pic Thing :)