Hi Gary,
try ADCON0 = 0
Hi Gary,
try ADCON0 = 0
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Something is strange.
I just tried your code for giggles and this is what happened.
It is not your code, something else is the matter. A lot of folks seem to be having problems with this chip....Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z -p12F675 "C:\MAC\PIC PROGS\TEST\12f675.bas"
PICBASIC PRO(TM) Compiler 2.50c, (c) 1998, 2008 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: RAM END must be defined.
ERROR: RAM BANKS must be defined.
ERROR: No LIBRARY statement or LIBRARY parameter.
ERROR: No LIBRARY statement or MACRO parameter.
ERROR: Unable to open file PBPMAC.INCHalting build on first failure as requested.
BUILD FAILED: Tue Sep 15 20:40:41 2009
Dave
Always wear safety glasses while programming.
Dave,
That's interesting.....
I tried with various settings in the config, watchdogs on and off, etc. I always use a 4k7 from MCLR to +5. That's just a "standard" here, and I always use the internal osc, and have never strayed far from 4mhz, so suffice to say that the config is pretty "plain".
Most of the timing floats someplace around variations of 1000 so that an aprox count in seconds should tell me when things happen.
The ONLY change here since the last functional chip is 4.31 software on the MELabs Programmer. And it's interesting that there's another thread nearby that the fellow is using the same programmer (although a much older code) and having "odd" issues.
Once again I've shipped it over to MELabs with a request for help.
Thanks to all who have responded. This kind of discussion is enlightening..
Cheers
Gary
Jerson,
The only change I see in your suggestion is an "else" for the Chubb. That part of the code is the only part that works repeatedly....
There is something whacked in the way the counter stuff is getting either compiled or put to the chip, or interpreted by the chip. That part is going off into lala land.
Gary
Hi,
Here is the V2.60 Answer :
Translated : Do not use " Loop " but "LoopA" ...C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\MERIACHEE.BAS ERROR Line 63: Syntax error.
C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\MERIACHEE.BAS ERROR Line 76: Syntax error.
C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\MERIACHEE.BAS ERROR Line 83: Syntax error.
C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\MERIACHEE.BAS ERROR Line 34: LOOP without a matching DO.Halting build on first failure as requested.
BUILD FAILED: Wed Sep 16 09:47:12 2009
No more error after changing " loop "
Considering your program behaviour ...
The IF THEN sequences looks highly Hazardous to me ...
I'd recommend you to make it somewhat clearer ... but it's me !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Gary,
Can you add the following lines to your code and compile it with the PM assembler like this
C:\PBP\PBPW.EXE -apm -p12F675 "C:\MAC\PIC PROGS\TEST\12f675.bas
This will embed the configuration into the HEX file. The way you have it now, I have simulated the code and find it is incrementing and repeating after 300. If you want the code to block per trigger of Chubb, you need to add the following to your trigger codeCode:@ device INTRC_OSC_NOCLKOUT, WDT_OFF @ device MCLR_OFF, PWRT_ON @ device CPD_ON, PROTECT_ON
Good luckCode:if Chubb = 0 then high trig if X < 11 then X = 12 gosub cola while Chubb : wend ' wait while Chubb is 1 endif else low trig endif
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Jerson,
That won't work. The Chubb needs to be high or low irrespective of the Led.
Alain,
P&J, toast and jam, goSUB and return. Can't change one without the other. Code works like a charm. It may not be elegant, but I'm not charging myself very much for it either...
Cheers
Gary
Bookmarks