2014-09-23, 09:21:01
Hey!
Status update:
I got it working with RS485.
I belive the root problem is at uart.inc at function Send().
The last few statements are:
; Disable tx
Now with this I cannot write flash memory.
I changed this to enable receiver as first instruction after send and now it is working:
Another way to get this working is to just comment out disable/enable RX.
Maybe there is problem, where PC program is answering too fast and RX is still disabled at that moment?
Status update:
I got it working with RS485.
I belive the root problem is at uart.inc at function Send().
The last few statements are:
; Disable tx
PHP Code:
ifdef USE_TXENABLE
banksel PORTR_TXE
bcf PORTR_TXE, PORTB_TXE;bank ?
bsf RCSTA_, CREN ;enable serial receiver
endif
Now with this I cannot write flash memory.
I changed this to enable receiver as first instruction after send and now it is working:
PHP Code:
ifdef USE_TXENABLE
bsf RCSTA_, CREN ;enable serial receiver
banksel PORTR_TXE
bcf PORTR_TXE, PORTB_TXE;bank ?
endif
Maybe there is problem, where PC program is answering too fast and RX is still disabled at that moment?