Exact match. Not showing close matches.
'[PIC] dsPIC33 UART'
part 1 4725 bytes content-type:text/plain; charset="iso-8859-1" (decoded quoted-printable)
does anyone have a code example for a dsPIC33 UART using flow
I'm trying to set up comms between the PIC and a Vinculum Vdrive2
using Tx/Rx/RTS/CTS but getting getting inconclusive results. Section
17 of the dsPIC datasheet
mentions what RTS and CTS do but doesn't explain all that much,
nor include them in timing diagrams, which would have been helpful.
I've looked around Microchip's site, no obvious AN
Below are various settings. After the initialisation, executing
confirms timing with 104us bit times on Tx. The Vdrive2 does put
out data on power-up (although I've yet to find the short sequences
of characters in its manual so they're possibly random), also 104us
bit times, seen on Rx. There's no acivity on either RTS or CTS. What
I expected to see was RTS low before and after sending the Carriage
Return, and high during the transmission. CR is a 'flashdrive present ?'
query to the Vdrive2 that should elicit a response from it
RTS and CTS have 16k pullups
Attached is what is seen after /mclr goes high. A flurry of so-far
unidentified data from the Vdrive2, then my pause and two CRs
sent, 10ms apart. Note that RTS does change state 5ms after the
reset. This is well after the PIC's registers have been configured
and in the middle of a simple 10ms delay that involves no pins
Any help would be much appreciated. At this stage I'm in a "Jim
Hacker" situation - don't know what I don't know ;-)) !!
; 0000 LCD data
; 0 En
; 0 RS
; 1 /CTS (in)
; 1 TX
; 1 RX
; 0 /RTS (out)
;peripheral pin assignments
; RP0 = RTS RB0 o/p
; RP1 = RX RB1 i/p
; RP2 = TX RB2 o/p
; RP3 = CTS RB3 i/p
;/U1RTS 00100 RP0 (RB0) tied to UART1 /RTS
; U1TX 00011 RP2 (RB2) tied to UART1 Tx
; U1RX 00001 RP1 (RB1) tied to UART1 Rx
;/U1CTS 00011 RP3 (RB3) tied to UART1 /CTS
; 1 UART enabled
; 0 continue in Idle mode
; 0 IrDA disabled
; 0 /RTS pin in Flow Control mode
; 10 Tx, Rx, /RTS and /CTS enabled
; 0 Wake-up disabled
; 0 Loop-back disabled
; 0 Auto-baud disabled
; 1 Rx idle state = '0'
; 0 BGRH = 0, low speed mode
; 01 8, N
; 0 1 stop bit
; 0 0 transmit interrupt mode
; 0 Tx idle state = '0'
; 0 Synch break disabled
; 1 transmit enabled
; - Transmit Buffer status
; - Transmit Shift Register status
; 00 receive interrupt mode
; - Address detect
; - receiver idle
; - parity error
; - framing error
; - over-run error
; - receive data available
;Fcy = 27.648MHz, baud rate = 9600
;UxBRG = ((Fcy/baud rate)/16)-1
;UxBRG = ((27648000/9600)/16)-1
;UxBRG = 179
mov #179,w0 ;baud rate, 9600 8 N 1
part 2 5456 bytes content-type:image/gif; name="dsPIC_Vdrive2_reset.gif" (decode)
part 3 181 bytes content-type:text/plain; name="ATT00001.txt"
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
I haven't used the dsPicc33 as yet and none of the books (like Creed Huddleston) demo code uses RTS/CTS etc.
Would it help if I sent you Microchips 'C' code setup examples from their C30 library, to see if their figures agree with yours?
Does your Pic have reconfigurable pins, if so have they been reconfigured correctly?
cdb, btech-online.co.uk on 30/06/2011 colin
Web presence: http://www.btech-online.co.uk Hosted by: http://www.justhost.com.au
More... (looser matching)
- Last day of these posts
- In 2011
, 2012 only
- New search...