CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Using RB6 and RB7 as EUSART while in debug

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JerryR



Joined: 07 Feb 2008
Posts: 167

View user's profile Send private message

Using RB6 and RB7 as EUSART while in debug
PostPosted: Mon Feb 08, 2016 4:27 pm     Reply with quote

I usually stay clear of using debug/programming resources as general IO, but I'm against the wall here on a new design.

I've connected a single channel Maxim RS-232 level translator (MAX3311E) to RB6 and RB7 with the intention of using the EUSART on a PIC16C1784 microcontroller. A PICKIT3 and an ICD3 refuses to debug with the MAXIM device in-circuit, even with the MAX3311E in shutdown. I can program the PIC and it runs fine, just will not debug. Yes, the dreaded "ICD3Err0040: The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding."

I can't imagine why the debugger can't share these lines.

I also have a RealICE, but have not tried it as yet?

I'm using MPLAB with CCS C PCWH v5.021.

Any suggestions group? I appreciate your help!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 08, 2016 7:24 pm     Reply with quote

The MAX3311E data sheet says on page 5:
Quote:
The MAX3311E receiver will remain active during shutdown.

The receiver has a 5K pull-down resistor on the input. Assuming you
don't a RS-232 cable connected, this pulldown will cause the receiver
section to output a high level. This high logic level will undoubtedly
interfere with your ICD3 debugger.

A possible solution would be to find a RS-232 level shifter that puts all
outputs into High-Z state when it's disabled or in shutdown mode.
JerryR



Joined: 07 Feb 2008
Posts: 167

View user's profile Send private message

PostPosted: Mon Feb 08, 2016 7:59 pm     Reply with quote

Thanks PCM. I'll research this tomorrow and get back.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Feb 08, 2016 8:55 pm     Reply with quote

try this-
on the RX input of the MAXIM - add a 2n3904 as an emitter follower with collector tied to 5v and emitter on the RX input

the floating base is your TX send-to pin.
if you really have to -add a 100k or less pull resistor UP from the base to +5v


i bet you it works....
JerryR



Joined: 07 Feb 2008
Posts: 167

View user's profile Send private message

PostPosted: Tue Feb 09, 2016 6:31 am     Reply with quote

Hi asmboy:

Thanks for the reply. I am going to isolate the rx and may try your suggestion later today.

Regards
JerryR



Joined: 07 Feb 2008
Posts: 167

View user's profile Send private message

PostPosted: Tue Feb 09, 2016 8:46 am     Reply with quote

PCM: Good call! Missed the effects of the pull-up on the RX input line. Isolated the RX output and debugging is happy now.

Asmboy: I may try your fix. Another pass on the PCB.

Great asset you two. Design review via forum board.

Regards
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Tue Feb 09, 2016 9:52 am     Reply with quote

Figure 2 on the data sheet shows schematically what PCM was talking about.

in the case of RS-232 TTL i would expect a WEAK pull UP to be the default input state - so the what MAXIM has done strikes me as ODD - though it might have something to do with their data_valid monitor feature/bug ;-))

i am betting you can find out by just hacking a TO-92 leaded version of the transistor onto your present PCB to find out.
JerryR



Joined: 07 Feb 2008
Posts: 167

View user's profile Send private message

PostPosted: Tue Feb 09, 2016 10:02 am     Reply with quote

Asmboy:

I'm guessing MAXIM wanted to maintain the RX in a predictable state by pulling the RX in low. Kind of surprised me too!

Best regards and, again, thanks for your interest.
Ttelmah



Joined: 11 Mar 2010
Posts: 19518

View user's profile Send private message

PostPosted: Tue Feb 09, 2016 11:35 am     Reply with quote

They are following the RS232 standard, so having 'off' reported as 'break'.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group