Jump to content

peter_pvk

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About peter_pvk

  • Rank
    Newbrie
  1. I knew it was going to be simple... and sure enough... I'm going to learn to read Real Soon Now. Thanks, Peter
  2. Greetings, I'm trying to compile the code given below for the 16F886 or 16F917. With the 4 lines commented out as shown, the build completes and functions as expected. If I uncomment the 4 lines, I get a message of "xxx.bas(7): error: general error" 1. What is a "general error" ? 2. How can I fix it? Thanks, Peter ............................ #pragma CLOCK_FREQ 4000000 sub main() dim i as byte dim v(70) as byte if v(2) = 80 and v(3) = 82 then for i = 5 to 58 v(i) = (call usart_rx()) next ' else if v(2) = 80 and v(4) = 71 then ' for i = 59 to 68 ' v(i) = (call usart_rx()) ' next end if loop1: goto loop1 end sub function usart_rx() as byte if ( (rcsta.OERR = 1) ) then rcsta.CREN = 0 rcsta.CREN = 1 usart_rx = 0x00 else do while (pir1.RCIF = 0) _asm nop loop usart_rx = rcreg end if end function
×