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

    Oh lol yea guess that wouldn't work well thanks... hmm How do you send to serial port on a different serial pin? Now I understand the problem im confused on how to fix it lol.

    I seem to have a lot of "Only learning opportunities." but atleast im learning

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    how about something like
    Code:
    '12F675
    @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON
    DEFINE OSCCAL_1K 1
    INCLUDE "modedefs.bas"
    TX_Pin var GPIO.0    'To DB9 RX pin 2
    RX_Pin var GPIO.1    'To DB9 TX pin 3
    
    TRISIO.0 = 0         'Set GPIO.0 to output.
    TRISIO.1 = 1         'Set GPIO.1 to input     
    
    ANSEL = 0            'disable ADCs
    CMCON = 7            'disable comparator
    
    AChar var byte
    tx_pin = 0           'inverted mode idle state
    
    achar="A"
    Pause 100            'OSC settle time... 
    
    loop:
        SerOut tx_pin,N2400,["Waiting for ",achar,13,10]
        SERIN  rx_pin,N2400,[achar]   
        serout tx_pin,N2400,["Got it...",13,10]
        goto loop
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Thank you very much Mister_e that works perfect and will get me a good start on serial

    Its so great to have cool people around that help us noobs

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Talking

    You're welcome. Great to hear it help you.

    Have fun!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Mister_e Mind if I email you or ask a non related question here?

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    No problem.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    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?
    Roger

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