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

    Ok cool I left it running for a while and got
    80
    90
    A0
    B0
    all close so how do I program that into the chip?
    I mean permanitly because I think I lost it on a number of chips when I very first started.
    Using Pic Kit 1 I don't see a way to manually set it.
    Last edited by geckogrotto; - 4th September 2006 at 04:47.

  2. #2
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Also could I get a sample of using SERIN?
    I have tried this and it outputs the hello world and then waits there and never loops. So I can only assume that its not getting the "A" char when I try and send it.

    InputSig var GPIO.0

    loop:
    SerOut Inputsig,N2400,["Hello World",13,10]
    Serin InputSig,N2400,["A"]
    Pause 200
    GoTo loop

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


    Did you find this post helpful? Yes | No

    Default

    Code:
    SerOut Inputsig............
    Serin InputSig............
    must be a copy/paste error...
    Steve

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

  4. #4
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    Code:
    SerOut Inputsig............
    Serin InputSig............
    must be a copy/paste error...

    Not sure what you are trying to tell me but I'm still stuck.

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


    Did you find this post helpful? Yes | No

    Default

    you send on the same pin you receive?
    Steve

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

  6. #6
    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

  7. #7
    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.

Similar Threads

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