Yes I can ...
- HSER defines only work with HSERIN/HSEROUT. If you are reading RCREG manually, the baud rate will not have been set by PBP and you will have to do that manually as well.<br><br>
- pulsin RXT,0,BREAKTIME, PULSIN does not work with interrupts. The timing will be wrong and you'll almost never see a Break pulse that way. Fortunately, the USART does it for you. Look for an FERR flag (framing error) which happens on every Break.<br><br>
- INTCON =%11000000, interrupts are controlled by the MIBAM routines. Don't change any interrupt registers.<br><br>
- PIE1.5=1, you've enabled the USART receive Interrupt ... don't do that.<br><br>
- RCREG = dummy, RCREG is a Read-Only register. Don't know what you were trying to do there.<br><br>
- SPBRG = 0, it's unlikely that you would want to put SPBRG (Baud Rate Generator Register) to 0 for any reason.<br><br>
- TXSTA.2 = 0, It's unlikely that you would want to put the USART in Low Speed mode when running at 250Kbaud.<br><br>
- TXSTA.4 = 0, OK, it's not synchronous mode .... but what is it?<br><br>
- I have no idea what you are trying to do here. RCREG is read-only, and you're reading 3-bytes from a maximum 2-byte buffer, without checking to see if anything is there.
Code:DATAAL: RVAL= RCREG RCREG = 0 RCREG = 0 GVAL= RCREG RCREG = 0 RCREG = 0 BVAL= RCREG ENDIF RCSTA.7 = 0 DMXFLAG=1 return
Back to the Drawing Board.
Bookmarks