Quite possibly - but we will hold-off sending the guys with the white coat over until we've seen schematics and code...Have I gone mad![]()
Quite possibly - but we will hold-off sending the guys with the white coat over until we've seen schematics and code...Have I gone mad![]()
Thanks for that Bruce - I should have asked matron to check my post - forgot to attach the code, Just arrived back from the village pub and tried Joseph's 4.7k pull up on mclr and lo and behold... it works ! many thanks for that .
Cheers David
I do not believe this ! After a spot of tinkering and adding to the circuit this am it has suddenly gone unstable again (It only operates when finger approaches or touches PIC) stripped circuit down to basic (schematic attached) and it still doesn't work. By the time i have finished it would be quicker to build the thing with valves (tubes) I used to understand them ! The code is as follows:
[@ device pic16f628a,INTRC_OSC_NOCLKOUT
define osc 4
begin:
low porta.0 ' Turn LED on
PAUSE 500 ' Wait 500mS (1/2 second)
high porta.0 ' Turn LED off
PAUSE 500 ' Wait 500mS (1/2 second)
GOTO BEGIN ' Loop continuously
end
Have you try turning off the analog comparators? if you dont know how just add ADCON1=7 near the top row...
Also, add the line
TRISA = 0
"No one is completely worthless. They can always serve as a bad example."
Anonymous
CMCON = 7 will disable the comparators. Also place a small 0.1 or 0.01uF cap between the PIC gnd & vcc pins. Make sure it's as close as possible to the pins.
It's also a good idea to include at least the minimum config options in your code so you're not left with whatever the default unprogrammed config bits are.
I would use at least @ device pic16F628A, intrc_osc_noclkout, wdt_on, mclr_on, lvp_off, protect_off.
If that doesn't take care of it, check your power supply.
yup..my mistake...its cmcon = 7...
Hi,
Thanks for the suggestions folks. tried them all one by one and got nowhere, then noticed that /MCLR was checked in PicKit 2. Unchecked it and everything worked like a dream ! I then worked backward taking each mod off in turn to see which one had done the trick! Yes, youve guessed it .. the dam thing still worked. I have reintroduced all suggestions again in the hope that this thing shows a tad more reliability, but I'm not holding my breath !
Thanks again
David
Bookmarks