SEROUT Just Garbage!


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    geckogrotto,

    I'm actually trying to understand a little bit more about serial communication and making some tests on my side too.

    I had to use a level converter (MAX232) to make the communication work.

    Looking at some posts, I have understand you connected your PIC directly to the PC's serial port (= without converter)?

    I must be wrong, no?

    Nope not wrong. I have pic output GPIO.0 connected to a 1K resistor then to serial pin 2 and GPIO.1 directly to serial pin 3. Serial pin 5 to ground.
    Also have a 0.1uF from pin 1 to 8 of the PIC + and ground. Thats it using the last bit of code Mister_e posted and its working fine.

    I should already be in bed now, I'm crashing now but if I can help I will tomorrow.

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    Ah!? (which means I'm very surprised!!!)

    I thought it was mandatory to use a level converter to transmit data from a PIC to a PC and vice-versa.

    I will try to connect my 12F675 as you did.

    In fact, my first try was with a 16F88 having an AUSART module and it didn't worked whithout the level converter (but I didn't use a resistor neither - I'll have to try this too). Data where transferred but it was unreadable - fuzzy characters and RX counter on PC never stopped. Is this (module) making a difference?

    Get "regenerated" first...

    Thanks
    Roger

  3. #3
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    Ah!? (which means I'm very surprised!!!)

    I thought it was mandatory to use a level converter to transmit data from a PIC to a PC and vice-versa.

    I will try to connect my 12F675 as you did.

    In fact, my first try was with a 16F88 having an AUSART module and it didn't worked whithout the level converter (but I didn't use a resistor neither - I'll have to try this too). Data where transferred but it was unreadable - fuzzy characters and RX counter on PC never stopped. Is this (module) making a difference?

    Get "regenerated" first...

    Thanks

    Let me know how it goes. I was getting weird chars at first but turned out my OSCAL was messed up. I believe you have to have
    DEFINE OSCCAL_1K 1
    ANSEL = 0 'disable ADCs
    CMCON = 7 'disable comparator
    in there for sure too.

  4. #4
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    OSCCAL is not valid for 16F88.

    Even with ANSEL and CMCON set, I still get strange characters on the terminal's screen.

    When I connect to my level converter, no problem.

    I'm goint to try with my 12F675...
    Roger

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Since the level converter provides inversion, and it works with the level converter, it follows that if you are not using a level converter, you need to send the data inverted.
    Charles Linquist

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    I just can't find the setting to "invert" data on Hyperterminal for Windows XP. Same for the Terminal emulator within Micro Code Studio.

    Since I'm always getting these same bizarre characters, it might effectively be because of this missing signal invertion.

    Can someone suggest any terminal emulator I could use?
    Roger

  7. #7
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    Can someone suggest any terminal emulator I could use?
    I use Tera Term. I find it much easier to use than hyperterminal. But, and I am speaking in the blind a little hear, I don't know if you can invert the singnals from the terminal software. Either way, you may find you like Tera Term, and it's FREE!

    Steve

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 16:46
  3. Advice-scrutiny for my serial controller
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th December 2008, 17:11
  4. Keypad unlock (as in garage door possibly)
    By Fred in forum Code Examples
    Replies: 5
    Last Post: - 2nd April 2006, 04:26
  5. Replies: 11
    Last Post: - 13th July 2005, 19:26

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