Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
USE_TXENABLE 16F1783 timeout
#7
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
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 
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?
Reply


Messages In This Thread
USE_TXENABLE 16F1783 timeout - by petspats - 2014-09-19, 15:44:01
RE: USE_TXENABLE 16F1783 timeout - by petspats - 2014-09-19, 16:56:25
RE: USE_TXENABLE 16F1783 timeout - by petspats - 2014-09-19, 18:45:20
RE: USE_TXENABLE 16F1783 timeout - by petspats - 2014-09-22, 07:35:37
RE: USE_TXENABLE 16F1783 timeout - by miklosch - 2014-09-22, 18:06:26
RE: USE_TXENABLE 16F1783 timeout - by miklosch - 2014-09-28, 01:16:10
RE: USE_TXENABLE 16F1783 timeout - by petspats - 2014-09-23, 09:21:01

Forum Jump:


Users browsing this thread: 1 Guest(s)