Serial Input, help! , PIC12f629


Closed Thread
Results 1 to 3 of 3
  1. #1
    kdh0009's Avatar
    kdh0009 Guest

    Default Serial Input, help! , PIC12f629

    I am trying to assign variables through the serial port which connects my pc to my pic. However all attempts so far have failed and each time my program times out and continues on with empty variables.

    I have found a number of suggestions online but so far none have helped.
    This is the opening part of my code, that relates to the Serial Input part of the code. (As written in microcode studio)

    define OSC 16 'Oscillator speed in MHz
    CMCON = %00000111 'Comparator Control Register
    INPUT GPIO.1

    c_cr con 13 'Carriage Return character
    c_lf con 10 'Line Feed Character
    c_sermode con 16468 '9600 Baud, Driven, Inverted, No Parity

    b VAR BYTE

    p_txd var GPIO.0
    p_rxd var GPIO.1

    init:
    'Clear all variables
    clear

    SERIN2 p_rxd,c_sermode,10000,timeout,[WAIT("1"),DEC b]

    I feel i must have missed some part of the setup. Any suggestions would be very helpful.

    Thanks

    Kieran.

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


    Did you find this post helpful? Yes | No

    Default

    how about the whole code? Schematic? Config fuses?
    Steve

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

  3. #3
    kdh0009's Avatar
    kdh0009 Guest


    Did you find this post helpful? Yes | No

    Default

    It's ok, Got it sorted using SERIN instead.
    Been trawling the internet for a while today looking for solutions, seen some very over-complicated code.

    The solution is usually simple!

    Thanks for replying anyway.

Similar Threads

  1. Serial Question + General Review
    By Freman in forum General
    Replies: 2
    Last Post: - 20th June 2008, 22:27
  2. Interrupt driven Buffered Serial Input
    By johnmiller in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 13th May 2007, 01:42
  3. Serial Input, PIC12f629
    By kdh0009 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 9th August 2006, 10:40
  4. Serial Keypad Input
    By OKST8 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th April 2005, 23:49
  5. serial input buffer
    By vsingh in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th June 2004, 05:55

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