The LED is on portb.2. Portb is set as all outputs except bit 1. See the trisb=1
So, where is the ... Tadaaa?? :-)
Ioannis
The LED is on portb.2. Portb is set as all outputs except bit 1. See the trisb=1
So, where is the ... Tadaaa?? :-)
Ioannis
Last edited by Ioannis; - 26th June 2007 at 12:06.
Last edited by Acetronics2; - 26th June 2007 at 12:36.
************************************************** ***********************
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 " !!!
*****************************************
I think I am,
trisb=1 is equal to:
trisb=%00000001
Isn't this bit 0 of port b set as input?
Ioannis
Hi,
Looks good ...
I tried THAT in MPSIM ... Works Great ...
INCLUDE "C:\PBP\MODEDEFS.BAS"
DEFINE OSC 4
INCLUDE "DT_INTS-14.bas" ; Base Interrupt System
INCLUDE "ReEnterPBP.bas" ; Include if using PBP interrupts
LED1 VAR PORTB.2
trisa=1:trisb=1:trisc=0:trisd=0:trise=0
PORTA=0:PORTB=0:PORTC=0:PORTD=0:PORTE=0
OPTION_REG = %00100001 ; Set TMR0 Prescaler to /2, RBPU on
adcon0=%10000000 'Fosc/32, ADC ON
adcon1=%10001110 'Right Justify, RA0 Analog, rest Digital I/O
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
INT_ENABLE INT_INT ; enable external (INT) interrupts
ENDASM
Main:
pause 1
GOTO Main
'---[INT - interrupt handler]--------------------------------------------------
ToggleLED1:
high LED1: pause 100:low led1
@ INT_RETURN
I just modified OPTION_REG value cause little things seemed strange to me ...
try it ... huuu ... is processor a 16F877 ????
Alain
Last edited by Acetronics2; - 26th June 2007 at 13:02.
************************************************** ***********************
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 " !!!
*****************************************
Yes Alain, MCU is 16F877, but this is minor.
Do you mean that with OPTION_REG=$81 does not work also at your test?
I have not the board with me at work now. I will test it late today.
Ioannis
I have an old 877 here...
I'll breaboard it ...
We'll 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, Ioannis
YOUR code has passed the Breadboard test ...
Works as expected ... ( little flash when PORTB.0 tied to ground )
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