PC Serial comms


Closed Thread
Results 1 to 8 of 8

Thread: PC Serial comms

  1. #1
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136

    Default PC Serial comms

    I'm using a VDrive2 module that communicates by RS232 at 9600 Baud. The problem is:

    1. Using PBP code on a PIC16F877A connected to the VDrive2 works properly. The VDrive module responds to commands and returns data correctly.

    2. Connecting the VDrive module to the PC by a RS232 converter chip works OK - but only for the first command, after that the VDrive2 will only send 'Bad Command.' Cycle the power and again it accepts one command, returns the correct data but won't respond to a second command, jut 'Bad Command' again.

    I'm not using RTS or CTS on either set-up.

    What's different between the PIC RS232 and the Max chip to the PC?

    Regards Bill Legge

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Do you have CTS , PIN 10 I think, connected to the zero rail?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136

    Default Pc rs232

    Sorry - I guess I am using CTS - it is connected to ground!

    Regards Bill Legge

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    What's different between the PIC RS232 and the Max chip to the PC?
    The PIC does TTL and the MAX does RS232.

    What is the command you are sending that causes trouble or does it matter which one?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136

    Default PC Serial comms

    All of the Vdrive2 commands work but once only and then the power needs cycling.

    I think it's some CTR/RTS thing?

    Regards Bill Legge

  6. #6
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136

    Default PC Comms

    I've just tried a different terminal program - and it all works OK.

    The terminal program incorporated in PBP won't work?

    Regards Bill Legge

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Just to the right of the send button in the MCS terminal is a place to set the CR-LF on send.
    Maybe that is setup wrong??
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136

    Default PC Comms

    I'm using Microcode Studio Plus and I can't find the button to set the CR-LF option?

    Regards Bill legge

Similar Threads

  1. Serial Comms through TX/RX pair jumbled
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th July 2009, 21:04
  2. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  3. interfacing to the pc serial port
    By kelangfei in forum General
    Replies: 4
    Last Post: - 7th October 2007, 22:35
  4. Replies: 2
    Last Post: - 23rd July 2006, 08:16
  5. Interrupt and Serial communication to PC.
    By obaskirt in forum mel PIC BASIC
    Replies: 2
    Last Post: - 17th June 2005, 20:01

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts