Shop OBEX P1 Docs P2 Docs Learn Events
Can some help a beginner out — Parallax Forums

Can some help a beginner out

samsearchersamsearcher Posts: 13
edited 2006-11-12 00:42 in Propeller 1
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

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-11-10 21:24
    Here is a Hello World example for the FullDuplexSerial object.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • samsearchersamsearcher Posts: 13
    edited 2006-11-10 21:53
    Thank you Paul

    This is what I was looking for.
  • william chanwilliam chan Posts: 1,326
    edited 2006-11-11 12:46
    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 BDavid B Posts: 591
    edited 2006-11-11 17:17
    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 BakerPaul Baker Posts: 6,351
    edited 2006-11-12 00:42
    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
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.