Exact match. Not showing close matches.
PICList
Thread
'[PIC] 877a+hardware uart+software uart = ARGHHHH'
2005\03\21@223352
by
nmpf
|
Hello ive a project in wich i need to use the hardware uart of the 877a and
a software uart, the hardware uart work well, the software gives sometimes
random caracteres :(, the strange thing is if i put a very long pause
between transmiting caracters using the software uart it doesnt send garbage
caracters .....
this is the routines have been using
clockrate equ .10000000 ; define clock rate (XTAL
frequency) here
baudrate_simulada equ .19200 ; define baud rate here
fclk equ clockrate/4
baudconst equ ((fclk/baudrate_simulada)/3 - 2) ;2
;fim das definicoes
;
; Serial Transmit Routine
;
transmit
movwf tx_reg
bcf _tx ;send start bit
movlw baudconst
movwf delay
movlw .9
movwf count
txbaudwait
decfsz delay, F
goto txbaudwait
movlw baudconst
movwf delay
decfsz count, F
goto SendNextBit
movlw .9
movwf count
bsf _tx ;send stop bit
return
SendNextBit
rrf tx_reg, F
btfss STATUS,C
goto Setlo
bsf _tx
goto txbaudwait
Setlo
bcf _tx
goto txbaudwait
More... (looser matching)
- Last day of these posts
- In 2005
, 2006 only
- Today
- New search...