Finally found out the answer, needed to save and restore the Bank Select Register in the assembly interrupt routine.
Upon entering the interrupt:
;save critical registers
MOVFF STATUS,_SSAVE...
Type: Posts; User: MarkEngineer; Keyword(s):
Finally found out the answer, needed to save and restore the Bank Select Register in the assembly interrupt routine.
Upon entering the interrupt:
;save critical registers
MOVFF STATUS,_SSAVE...
I am using a PIC18F87K22 micro. I have timer2 setup with PR2 to generate an interrupt 250 times per second
'setup timer2
'Fosc/4 with prescaler=16 AND postscaler of 16 yields 62,500 Hz, count of...
scratch that, the problem was I erroneously has another device also chip selected on the bus.
I am having a very strange problem with the Microchip MCP23S08.
It seems no matter what I do, bit #6, GP6 is ALWAYS an input.
I send 0 to the IODIR register to make all 8 bits to be outputs.
I can...
OK here is what I did to solve my issue....
LCDARRAY VAR BYTE[20]
LCD VAR BYTE
LCDHI VAR BYTE
LCDLO VAR BYTE
GOSUB CLEARLCDARRAY
Thank you all for the replies but
LCDOUT $FE, LINE1, Dec X1, " ", Dec X2, " ", Dec X3, " ", Dec X4, " ", Dec X5
also works exactly the same.
The display will show 10 11 12 garbage.....
I need...
Having a problem with the LCDOUT Command on a PIC18F46K22 at 16MHz with a Vishay 4x20 LCD Display.
If I use LCDOUT this way:
LINE1 = $80
LCDOUT $FE, LINE1, "01234567890123456789"
It...
Thank you, SDEC works!
Hello is there a way to use LCDOUT with a long variable?
DEFINE X VAR LONG
LCDOUT $FE, LINE1, #X
It appears to always convert the variable to a WORD then outputs it
Thank you, that worked well
How would I create a 550 location word lookup table not in RAM but in my code?
I am using a PIC18F87J50.
Thanx,
Mark
That code is writing to a Microchip MCP4922 DAC on the SPI bus.
SP_INT_FLAG VAR PIR1.3 which is SSP1IF indicating the SPI write was completed by the micro.
I suppose it could be an infinite loop...
OK Without changing any code I got the program to work. All I did was rearrange the subroutines. Is it possible that one of the subroutines was at a code page boundary?
OK I am using MPLAB 8.92 with PICBASIC 3 Gold
GOSUB TEST1 works fine
GOSUB TEST2 (or ANY subroutine after it) does not
Here is my code, all comments are welcome
; Tell PBP the expected...
Watchdog timer is off, I do use an Assembly interrupt routine to create a time base using TIMER2. AT 16 MHZ I can make a 1/100th second interrupt.
I do not think I am overflowing the stack (or...
It is the day after Thanksgiving. This sound like a problem I am having with a PIC18F46K22. Certain subs that I call make the program go into outer space. I have even tried GOSUB to a subroutine...