PDA

View Full Version : Reuse of P30/31 for programming/general serial



Steve Hicks (N5AC)
10-16-2006, 08:19 AM
I would like to be able to do a couple of things with a serial port:

1. Interface to a PC to update operating parameters in my Propeller software
2. Reprogram the EEPROM on the propeller with new software from a PC application

My questions are:

1. Can I reuse the "main" serial port (P30/31) to both program the EEPROM attached to the propeller as well as interact with my program? -- I believe this is a "yes," and so I'm trying to understand the DTR/RESn·relationship.· I am guessing that the Propeller tool pulses RESn (via DTR) and then communicates with the chip to reprogram the software.· If this is the case, I assume that my PC program can just interact with the running software provided it doesn't mess with DTR.

2. My PC application is a .NET application that will be periodically updated.· Can I use the application to also update the propeller software via the on-board boot-loader program?· In other words, can I pulse DTR and interact with the boot-loader to rewrite the EEPROM also?· Is there documentation on how to do this?

Thanks,
Steve

Steve Hicks (N5AC)
10-16-2006, 08:21 AM
Oh and also, I have seen the "Serial to Propeller Connection Schematic" which uses three transistors to build the serial interface and also using the MAXxxxx parts for serial interface.· Is there a preferred method?· I'm familiar with using MAX232 and it's various derivatives (obviously a 3.3v one would have to be used such as the 3232).

Thanks,
Steve

Mike Green
10-16-2006, 09:13 AM
1) The problem with DTR is that frequently the PC will pulse that when it opens the serial channel thereby resetting your Propeller
2) You could write a loader. Chip has posted the protocol and someone else (Paul? Beau?) has talked about writing a PC loader, but hasn't had the time. The EEPROM writer just copies the whole RAM to the whole EEPROM once the RAM is loaded. There's no fine control of EEPROM interaction if that's what you're asking.

R Pankau
10-16-2006, 09:56 AM
FYI, I just posted a similar question yesterday and "Dennis" had a pretty good explanation of how to deal with DTR.·· I was using P30 and 31 for the same purpose with Hyperterminal and it would reset my chip when I made a "call" also DTR was masking most of the signal so tying the 10K resistor that goes from DTR to the collector of a 2N3906 to 3.3V instead, allowed the signal to appear again at 232 levels.·

R Pankau
10-16-2006, 09:58 AM
sorry, the 10k originally went to the emitter, can't read my scribbles.·

R Pankau
10-16-2006, 10:39 AM
Actually The prop tool seems to hold DTR at -10V to give a good span. xmit signal goes betwen -3.5 and +3.3. Without the DTR the bottom is 0V and I'm afraid that it isn't workable. At this point I'm probably going to use another pin for monitoring and leave the programming circuit alone.

Beau Schwabe
10-16-2006, 12:46 PM
The issue here is with the DTR, but it's because it's being used for a dual purpose.· One is to reset the Prop, and the other is to provide a -V·supply through a 10K pull-up resistor.
If your software is capable of controlling the DTR and forcing it LOW(-V), then you shouldn't have a problem.· On the other hand you could try this circuit modification below to see if it
would work.· It uses the RTS signal rather that the DTR to get a -V reference.· The drawback is that your bringing a 5th·connection from the DB9 Serial connector instead of the 4
connections that are currently being used.

http://forums.parallax.com/attachment.php?attachmentid=43660





▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

R Pankau
10-17-2006, 02:02 AM
I know this wasn't my original post but this really does answer my question. I'll try the above idea with RTS tonight.
Having one more wire isn't that bad when you consider that now you have a debug port and a programming port all in one.
thanks.