looking for a quick sanity check


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default looking for a quick sanity check

    After 10+ years of playing with PIC's, Its time to talk to a puter. I have attached my test schematic for critique. Please note all the optional pin names may not be correct on the PIC, I tend to get rather lazy about changing all the names. But I have connected the correct pins for ICSP and Tx2/Rx2.

    Heres my setup I am thinking about:
    Laptop running win7-64
    USB->RS232 cable
    ICD3->ICSP
    Power circuit from ICD3 through ICSP for serial testing
    Some sort of hyperterminal style PC side (prolly Daves (Mackrackit) serial.py code)
    Hardware USART PIC side
    PBP 2.6a
    Int clock

    Now I would love to use USB instead of RS232, but that seems like trying to run when I can't even walk yet. So I guess my question is will the above collection of parts along with the proposed circuit give me the ability to make this work?

    Name:  serial test.png
Views: 442
Size:  22.8 KB
    Last edited by cncmachineguy; - 13th November 2010 at 14:04. Reason: keep thinking of things too add
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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

    Default

    I am used to using the PicKit2 so the programming header looks off, what are you using?

    I would not tie the extra pins on the DB9 together, just use 2,3, and 5 as you have them.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default

    thanks Dave. I use ICD2 or 3 So all my ICSP headers are custom. I do think I will configure it to be the same as Pickit2 as it seems to be populer.
    I will remove the jumpers, that came from the 3311 datasheet.

    Any thoughts on the usb->232 cable? will this work?
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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

    Default

    I must have a different data sheet, I do not see the jumpers. But I am still half asleep...
    http://datasheets.maxim-ic.com/en/ds...11-MAX3313.pdf

    Are you talking one of those USB to serial conversion cables? If so, yes. Those conversion cables will also work if you are using SERIN2/SEROUT2 inverted without a MAX chip.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    One thing to be aware of is that USB-serial adapters require conversions on both ends, serial-to-USB & USB-to-serial. This can be a factor in time critical applications. IOW, 9600bps will not be a true measure of throughput. I have encountered problems with some bootloaders when using USB-serial and, also, with ethernet-serial adapters. Also, while not a factor here, some USB adapters do not handle all of the modem control lines like DTR, etc.

  6. #6
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default

    Quote Originally Posted by mackrackit View Post
    I must have a different data sheet, I do not see the jumpers. But I am still half asleep...
    http://datasheets.maxim-ic.com/en/ds...11-MAX3313.pdf
    No, I am the one asleep, after looking at the datasheet again, I realized that came from some circuit I found on the net.
    Are you talking one of those USB to serial conversion cables? If so, yes. Those conversion cables will also work if you are using SERIN2/SEROUT2 inverted without a MAX chip.
    Is this Yes it will work as I want, and also it will work using SERIN2/SEROUT2...?
    The target puter for this app has an actual rs232 port, but I am wanting to play with my laptop first.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  7. #7
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default

    Quote Originally Posted by dhouston View Post
    One thing to be aware of is that USB-serial adapters require conversions on both ends, serial-to-USB & USB-to-serial.
    I'm not sure what you mean here
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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

    Default

    I use these with ny laptops.
    http://www.tripplite.com/en/products...xtModelID=2430
    As long as the signal is inverted, either by software or hardware it will work.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    Quote Originally Posted by cncmachineguy View Post
    I'm not sure what you mean here
    I doubt it's a factor here but...

    On the PC end your serial signal gets converted to USB before it's transmitted. When received at the adapter it is converted from USB back to serial and then passed to the PIC. If your link is bidirectional the same conversions take place on signals from your PIC to your PC. At 9600bps, it's not much of an issue but at higher bit rates it can be significant. I've seen firmware downloads to an MCU that took 5 or more times as long over a USB-serial-adapter vs. a straight serial link. In some cases the download failed because the supervisory software didn't receive an ACK within the expected time. This can be even more pronounced over ethernet-serial adapters if there is heavy network traffic.

    As I noted, it's just something to be aware of so you won't be scratching your head should you encounter it.

  10. #10
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    Quote Originally Posted by mackrackit View Post
    I like these...http://www.byterunner.com/byterunner...ct_match=exact. They work with Windows, Linux and OSX. You need drivers for Windows & OSX.

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

    Default

    Quote Originally Posted by dhouston View Post
    I like these...http://www.byterunner.com/byterunner...ct_match=exact. They work with Windows, Linux and OSX. You need drivers for Windows & OSX.
    About half the cost too.
    Thanks!!!
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default not normally this dense

    Well maybe I am, but I don't know if I know more now or less. Heres where I have stumped myself.

    Now the 3311 inverts the signal, so should I not use it if I am using the 232 to usb? Or does the cable take care of this? I would stupidly expect the 232 to usb cable to send/receive proper usb signals on the usb side and proper 232 signals on the 232 side.
    This sounds like daveH post.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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

    Default

    When going to a PC, the serial signal needs to leave the hardware inverted(PIC and components). Does not matter if you are going to a regular serial port or using a USB to serial converter.

    The PIC, if using the hardware ports "HSEROUT" sends a TRUE signal so the MAX is needed for the inversion.
    If bit-banging, "SEROUT2", then you can invert in PIC software.
    Dave
    Always wear safety glasses while programming.

  14. #14
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default Thanks guys

    I think I have enough to get in trouble with now. I am off to put my test circuit together and start talking (or not).
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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