Shop OBEX P1 Docs P2 Docs Learn Events
Serial Comm — Parallax Forums

Serial Comm

greybeardgreybeard Posts: 65
edited 2007-08-09 23:40 in Propeller 1
I need to use FullDuplexSerial.Spin in an application and have put together a test program that simply creates the object and sends 1 byte of data every 500 milliseconds. I use a the TV_Text.spin· to display what is sent and toggle a led each time a byte is sent.· Simple.· I am using hyperterm on a WinXP system with a USB to RS232 adapter for communication to the PropRPM prototyping board.· Download the program from the Propeller Tool connect the hyperterm to the port and it SHOULD work....And it did for a while

When I first put it together, it worked.· Changed the delay between bytes and it quit working.· The led flashes at the new rate and characters come out on the monitor but· nothing appears on the hypertermal screen.· Changed the delay back and it still didn't work.

I know the serial·communication··is working because I can re-program the chip with a new delay between bytes and a new byte sequence to display and can see the new flash rate and byte sequence on the screen.


Also,· I notice that that after the hyper term is connected, the propeller will reset when it is disconnected, whether characters are received or not.·

Comments

  • NewzedNewzed Posts: 2,503
    edited 2007-08-09 13:04
    Greybeard, I have my Proto Board talking to Hyper and it works perfectly.· Here is the sequence I use:

    Add a 15 second wait at the very beginning of the prop program.

    Load the Prop program into EEPROM

    Load my Hyper program

    When the 15 seconds has elapsed, the data appears on Hyper

    I am using Mike Green's OS system with the simulator object and I have modified some the the serout routines so that they use Pin 30 of the Prop.· The communication is strictly one-way.· If Hyper says "Enter something", I enter it, but is is the Prop program·that accepts the command and executes it.· Hyper is just a duplication of what appears on my VGA.· I modified my program so I could use it on the bench where I have no extra VGA - I just use Hyper as a substitute.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • greybeardgreybeard Posts: 65
    edited 2007-08-09 15:33
    Thanks.· Got it.· Works now.· Any idea why the propeller chip resets when the serial connection is broken??· Is there a way to prevent this??
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-09 15:35
    greybeard,
    The programming circuit is designed to force the Propeller to reset when the serial connection is broken. The reset is necessary for programming. The only way to prevent it is to disconnect the DTR line, either in the serial cable or in the interface to the Propeller chip which is shown in the datasheet and the Propeller manual. The DTR line has to be reconnected for programming to work.
  • AribaAriba Posts: 2,685
    edited 2007-08-09 23:40
    Try it with PropTerminal instead of Hyperterminal -> http://forums.parallax.com/showthread.php?p=649540.

    At the end of the readme file is a description how you can prevent a reset on closing the COM port (but only if you use a USB-serial converter with FT232).

    Andy
Sign In or Register to comment.