I recently made a circuitboard and insterted a Pic 16f628a microchip in it. When I tested it with running an LED over the positive and negative it works, yet when I try to run it over a pin that I programmed to send voltage to by holding the LED over the positive and negative, it doesn't work. It worked on my programmer (that comes with LEDS to show outputs) and I've included the source.
I haven't soldered them on to the board yet, what I did is just put the anode on one of the pins (in this case RB0) and the cathode on the Vout pin by hand to see if it works.
Without a series resistor you're taking a chance there on the life of the LED.
Unless you have a schematic of the 'actual' board that you are using, it's near on impossible for anyone here to help.
For one thing, Nigel's tutorials ( that you have 'basically' copied the main board of ) use a different style of switch recognition to the Velleman.
If the code you have works on the K8048, but doesn't on your board, then it's 'your board' that has the problem. And as you haven't finnished building it yet, it's no wonder that it doesn't work.
Two questions; Is VDD supposed to be connected to the positive terminal? And if I put a LED on the same main positive wire that goes to the microchip, is it supposed to turn on? Because mine isn't.
Thanks for the programming advice Yeah my problem probably is on my PCB. I'm also wondering if the "reset" part of my program has anything to do with it not working on my PCB. Anyway; I've attatched the schematics for the exact layout on my PCB. Although I've already showed how the connection for RB0 is done, and its the same for Rb1... ect.
Thanks for the programming advice Yeah my problem probably is on my PCB. I'm also wondering if the "reset" part of my program has anything to do with it not working on my PCB. Anyway; I've attatched the schematics for the exact layout on my PCB. Although I've already showed how the connection for RB0 is done, and its the same for Rb1... ect.
My 9V battery is only reading 8.0V off my digital voltmeter, while when I connect the voltmeter over the microprocessor or the 1k ohm resistor, it only reads 3.22V. When I connect to the battery,however, it only reads 6.60-6.70V. Should I get a new battery or is there something wrong with my Voltage regulator? I'm pretty sure my voltmeter is accurate though because it reads a 1.5V cell as 1.57V.
Try following the schematic and program on your 16F628A (download the detailed .pdf from my site). Ignore the MPLAB stuff as your programmer is different. **broken link removed**
My 9V battery is only reading 8.0V off my digital voltmeter, while when I connect the voltmeter over the microprocessor or the 1k ohm resistor, it only reads 3.22V. When I connect to the battery,however, it only reads 6.60-6.70V. Should I get a new battery or is there something wrong with my Voltage regulator? I'm pretty sure my voltmeter is accurate though because it reads a 1.5V cell as 1.57V.
Hi,
It sounds like your 9Vbty [PP3?] has been fully discharged, you need a new one.
Alkaline PP3 9Vbtys are made up of 7, 1.2V cells, so you would expect about 8.4V on a good battery.
Also if you are using a standard +5Vreg it requires at least 2 to 3V across the Vreg to work within specification.
Regarding pin#5, IIRC you have configured it as MCLR, not RA5 ??, double check it...
Hi,
It sounds like your 9Vbty [PP3?] has been fully discharged, you need a new one.
Alkaline PP3 9Vbtys are made up of 7, 1.2V cells, so you would expect about 8.4V on a good battery.
Also if you are using a standard +5Vreg it requires at least 2 to 3V across the Vreg to work within specification.
Regarding pin#5, IIRC you have configured it as MCLR, not RA5 ??, double check it...
So would you recommend me using 6x 1.5 V cells instead? Would AA or AAA be better? Is setting pin#5 to MCLR a bad thing? Sorry if I'm asking stupid questions or anything, I'm just new to this whole microcontroller concept, (and also programming in assembly). Does anyone have any tips to get atleast 4.5V or greater to the microcontroller since it's only getting around 3.2V to it?
So would you recommend me using 6x 1.5 V cells instead? Would AA or AAA be better? Is setting pin#5 to MCLR a bad thing? Sorry if I'm asking stupid questions or anything, I'm just new to this whole microcontroller concept, (and also programming in assembly). Does anyone have any tips to get atleast 4.5V or greater to the microcontroller since it's only getting around 3.2V to it?
Hi, The problem with alkaline batteries is that a single cell gives about 1.2V, the older zinc-carbon batteries gave about 1.5.
For some reason the industry seems to be stuck with the older ZincCarbon designation, IMO the correct voltage should be printed on alkaline batteries.
If I am correct and you have CONFIG pin#5 as MCLRE, ie:ON, it means the PIC is not being RESET at power up.
If its set to OFF, so that you can use it as an I/O pin, then the PIC's internal Reset line is connected to Vdd, so its reset OK.
That means you can use RA5 as a I/O pin.
Look at the CONFIG Word on the PIC's datasheet.
Are you using a +5Vregulator between the battery and the PIC??
Does this make it clear? EDIT: Disregard the section re-alkaline battery voltages.... its NiCd
Hi,
The problem with alkaline batteries is that a single cell gives about 1.2V, the older zinc-carbon batteries gave about 1.5.
For some reason the industry seems to be stuck with the older ZincCarbon designation, IMO the correct voltage should be printed on alkaline batteries.