Search Results - MEL PICBASIC Forum


Search:

Type: Posts; User: MarkEngineer; Keyword(s):

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    4,803

    Re: HSEROUT with Timer2 Interrupt

    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...
  2. Replies
    1
    Views
    4,803

    HSEROUT with Timer2 Interrupt

    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...
  3. Replies
    12
    Views
    7,713

    Re: Need help with MCP23S08

    scratch that, the problem was I erroneously has another device also chip selected on the bus.
  4. Replies
    12
    Views
    7,713

    Re: Need help with MCP23S08

    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...
  5. Replies
    5
    Views
    4,958

    Re: Lcdout multiple variables issue

    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
  6. Replies
    5
    Views
    4,958

    Re: Lcdout multiple variables issue

    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...
  7. Replies
    5
    Views
    4,958

    Lcdout multiple variables issue

    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...
  8. Replies
    4
    Views
    3,236

    Re: LCDOUT with a LONG Variable

    Thank you, SDEC works!
  9. Replies
    4
    Views
    3,236

    LCDOUT with a LONG Variable

    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
  10. Replies
    2
    Views
    2,720

    Re: Word Lookup Table in Code

    Thank you, that worked well
  11. Replies
    2
    Views
    2,720

    Word Lookup Table in Code

    How would I create a 550 location word lookup table not in RAM but in my code?
    I am using a PIC18F87J50.
    Thanx,
    Mark
  12. Replies
    22
    Views
    11,076

    Re: Broken code

    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...
  13. Replies
    22
    Views
    11,076

    Re: Broken code

    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?
  14. Replies
    22
    Views
    11,076

    Re: Broken code

    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...
  15. Replies
    22
    Views
    11,076

    Re: Broken code

    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...
  16. Replies
    22
    Views
    11,076

    Re: Broken code

    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...
Results 1 to 16 of 16