Alain
I'm not really sure what to make of it. What is the state of LED? On or Off?
Alain
I'm not really sure what to make of it. What is the state of LED? On or Off?
Hi, Jerson
PORTB.0 = 1 : Led do not work
HIGH PORTB.0 : Led works fine
Hi, Ski
I verified the ASM ... doesn't read anything at all ,here.
so, the only "surprising thing" is it writes PAUSE duration in W while addressing page 1 ... but I do not think it should cause any trouble ... I suppose it works like that not to toggle Page twice, if staying on page 1 !Code:PORTB.0 = BSF PORTB,0 HIGH PORTB.0 = BSF PORTB,0 BSF STATUS, 5 BCF PORTB,0 **Next ASM command** MOVLW 0xC8 ( Pause duration ) BCF STATUS, 5
I'll try the program with XTAL clock ( it's the first time I use INTRC with this snippet ...) ever has worked well till yesterday ... just to see.
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 " !!!
*****************************************
Hi Alain,
My guess would also be read-modify-write. Try increasing the pause time from 200 to
1000 in the first version you posted that isn't working. Does it work with the longer
pause?
I had something similar.
And even tough PORTB.0 = 1 or 0 did not work, interestingly PORTB.0 = PORTB.0 ^ 1 worked.
??
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
another thought ...
try removing the LEDs and watching the pins with a scope or DMM. If no load works then add more decoupler / filter caps.
just my 1 cent
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Alain
Just thinking aloud. I am assuming the 16f628 / 20 in the subject means you are thinking it runs at 20MHz or is it something else? The INTOSC for the 628 is 4MHz. Perhaps you have declared 20MHz for OSC like below. Is this a possible cause?
define OSC 20
I do remember having faced a problem like this once before, but unfortunately, I cannot recall what it was and in which project. It too had to do with an LED though. All I remember is that I had to write the port twice with a delay between the 2 writes to get it to behave.
Hi, Jerson
It's not a speed issue nor ... I intend to make them run @ 4Mhz !!! ( or so ... the RCINTOSC is somewhat aside the 4Mhz !!! )
This Pic is just ... 10% under the 4 Mhz !!! ( 136 units for a true 1500 µs pulse ).
I think we met the same issue ...
Hi, Bruce
The Pause time modifying do not change anything.
Hi, Sayzer
That's the strange thing ... just the ( let's say ) ASM command doesn't work. A signal rise and fall time issue inside the Pic ???
Hi, Paul
Signal is neat and right on the DMM ... only without the Led !
So, ... I have to try another Pic Sample to confirm !!!
BTW ... I discovered in MPLAB 8.10 programmer, If you ask for ALL Erase ... The EEPROM is NOT Erased, and you must explicitly ask for FF Writing ...
same issue in the toolbar's "Erase Flash Device" ...
to be verified for other processors ...
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 " !!!
*****************************************
Bookmarks