Serin,Serout Problem


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    Quote Originally Posted by orwell101 View Post
    Hello!

    I am a Newbie on programming Micros.
    I have a PIC 16F84 an wrote a littele Program.
    This is my Programm:
    INCLUDE "modedefs.bas"
    B0 var byte
    a var byte
    SI var PORTB.7
    start:
    SERIN si,T2400,B0
    if b0 <> "0" then
    for a= 0 to 255
    serout si,T2400,[a]
    next a
    endif
    goto start
    end

    When i send an X in the serial communicator window,the PIC sould send
    the complette ASCII codes.
    But the PIC send this:
    X!–ˆA9Œ#‘T‘!†Ž3’H!CR‰"’*Sq‰fœ2cRbr‚’ j(PPb=RiQQfy}-RR**™-Mm*
    –Xq-1=AMQ]amq}‘*˜``
    !"#,-./0123<=>?@ABCLMNOPQRS\]^_`abclmnopqrs|}~€‚ƒŒŽ‘’“œžŸ *

    The Settings of then Serial Communicator is:
    COM1
    2400 Baud
    NoParity
    ByteSice 8
    1 Stop Bit

    What do i wrong?
    I think its a little Problem for the most afl here.
    Sorry for mx English(german)

    Thanks a lot for your help!
    That you get output is good, that it is garbage can have several causes. 1 oscillator is not defined in code, 2. baud rate mismatch between sender & receiver. 3. sending and receiving mismatch (one true the other inverted). 4. long or loss-ey cables causing data corruption, or receiving noise.5.mismatched data profile I E parity # of bits . . .
    I would DEFINE OSC x where x represents your crystal or resonator, or if you are using INTRC then make (x) 4. The define does not make the oscillator work at that speed it simply forces PBP to adjust all of it's timing to accommodate the defines speed.
    Last edited by Archangel; - 28th October 2012 at 07:19.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Serin and Serout problem
    By rubisharmax in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 10th June 2012, 13:20
  2. problem with serout and serin 2
    By amtechnology in forum General
    Replies: 0
    Last Post: - 14th May 2012, 13:08
  3. Another Serin/Serout Problem!
    By jmbanales21485 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th June 2007, 16:26
  4. Serin serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 336
    Last Post: - 6th February 2007, 04:25
  5. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44

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