PDA

View Full Version : Can some help a beginner out



samsearcher
11-11-2006, 04:00 AM
Can some help a beginner out
I recently purchased a propeller chip and have been trying to learn spin. I'm not much of a programer but was able to work out most programs I attempted on the basic stamp. I have read the propeller manual and have worked through the programming Tutorial and seem to have a grip on some of this. OK this is what I'm trying to do and this is what I have to work with. I have a propeller chip mounted on a bread board with a 3.3 V. power supply, external EEPROM, 5 MHz crystal and I'm using a prop plug to program the propeller chip with and every thing is working fine. Now here's the problem, I have been trying send and receive from the propeller chip using the FullDuplexSerial OBJ to the computer. I have a simple program that I wrote using RealBasic that sends the serial data to a text window and it works fine with the basic stamp. So far I have not made any progress with the propeller chip. Would somebody please post a vary short and simple program demonstrating how to send and receive a short line of text from the propeller chip to the computer that could be displayed in a program like Hyper Terminal.ĚThis would be vary helpfull in getting me started and I'm sure there are other beginner that would also find this usefull.

The Serial setting I'm using in my terminall program are
2400 Baud
8 bits
no parity
1 stop bit

Thanks

Paul Baker
11-11-2006, 04:24 AM
Here is a Hello World example for the FullDuplexSerial object.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

samsearcher
11-11-2006, 04:53 AM
Thank you Paul

This is what I was looking for.

william chan
11-11-2006, 07:46 PM
Paul,

Can the Propeller talk to a real PC Com port directly using just serial resistors like the SX can?
I need to ask this b'cos the Propeller only runs 3.3v unlike the 5v for the SX.

Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

David B
11-12-2006, 12:17 AM
It depends on what voltage levels the PC will accept.

When I first got my propeller I wired up the discrete transistor serial programming interface that was presented in several places here in this forum, but it didn't work.

I really wanted to get to the bottom of this and thoroughly understand it, so I wrote a PC program to read and write the serial port, and on the hardware end, connected a serial source and driver powered by a variable voltage. I was able to show that my particular PC (an IBM NetVista with built-in serial port) would NOT respond to a 3.3V incoming signal level on the serial port, but worked fine when I raised it to 5V.

So I had to modify the circuit by changing the TX driver transistor from a PNP to an NPN with 5V on its collector, and it worked, and has been working reliably for months.

But I think I'm a minority. I get the feeling that most people who've built that circuit have successfully sent 3.3V serial signals to their PC from the propeller, so you might want to go ahead and try it, but if it fails, keep in mind that voltage levels are a possible reason why.

David

Paul Baker
11-12-2006, 07:42 AM
David is correct, most modern serial ports have the ability to recognize 5V signal levels, but not 3.3V signal levels. You will have to use a transistor to step the output upto 5V.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)