Hardware comms on 16F877A and 18F4550 to PC


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    the USB to serial adapter is giving me 5V on the control lines (RTS, DTR) so i'm assuming it's a cheep and nasty..

    Having said that, now that i've had some sleep... i could write a pic program to sequentially spit out 0 to 255 (DEC) and use realterm to display the binary of what it receives... this will tell me if it's a hardware setup problem or if it's an inversion problem (or both). i'm also going to drop the baud to something ridiculously low... realterm does bauds as low as 110...

    I'm going to be putting in an order with crownhill for a load of 18F4550's probably towards the end of the week along with some other items and wire etc...

    What i want is not to use HSER commands and use an interrupt based comms handler, but untill i sort this problem...

    thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by comwarrior View Post
    this will tell me if it's a hardware setup problem or if it's an inversion problem (or both).
    It is definitely inverted. The UART expects you to use a max232 to talk to a computer. That is, unless you set the bits I showed you. To help eliminate a possible setup issue, you can set the baud using this calculator: http://www.picbasic.co.uk/forum/cont....-PICMultiCalc .

    What i want is not to use HSER commands and use an interrupt based comms handler, but untill i sort this problem...
    Using the UART is the best to use with an interrupt. It has a buffer, and it's own interrupt.

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by comwarrior View Post
    the USB to serial adapter is giving me 5V on the control lines (RTS, DTR) so i'm assuming it's a cheep and nasty..
    Comwarrior, What are you doing with the CTS(clear to send) line? If the RTS(request to send) and the DTR(data terminal ready) line from the usb are active it's ready to play. If you are only using 3 wire serial comm then, tie the DTR to the CTS line which will tell the USB that the pic is ready to send data. Also make sure the PC side has handshaking turned off.. As far as RX & TX polarity goes, when the serial bus is IDLE both RX and TX should be at +5 volts... You can check this with a meter...

    Dave Purola,
    N8NTA

  4. #4


    Did you find this post helpful? Yes | No

    Default

    i wired up a max232 and she's behaving now... well, i'm receiving the initialisation txt's...

    However i have another problem now... but i'll start a thread in pbp for it since it seems to be software... i hope

Members who have read this thread : 0

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