Serout problem


Closed Thread
Results 1 to 40 of 95

Thread: Serout problem

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I tried ansel =o all you told me, and remove the boatloader. Dont even know why it was there. There is no change in the system .
    If I am sending $aa on the tramsitter pic, shouldn'y I get that also on the LCD on the transmitter?

    I have four output on my transmitter. Here is your code to with only four values, the rest I didnot change it. None of the leds are lighting besides the initial feed:

    'RECEIVER CODE

    DEFINE OSC 20 '20Mhz Oscillator was used

    Include "modedefs.bas" ' Include serial modes

    ADCON0 = 0 'AD MODULE OFF & CONSUMES NO CURRENT
    CMCON = 7 'COMPARATORS OFF
    TRISA = $00 : TRISB = $FF 'all porta is outputs, all portb is inputs

    B0 var byte

    'testing led outputs
    porta.0 = 1 : pause 200 : porta.0 = 0
    porta.1 = 1 : pause 200 : porta.1 = 0
    porta.2 = 1 : pause 200 : porta.2 = 0
    porta.3 = 1 : pause 200 : porta.3 = 0

    start:
    B0 = 0 'empty B0 because the program doesn't
    serin PORTB.3,n2400,[B0] 'if n2400 doesn't work, try t2400
    if B0 = $AA then ledson 'manchester encoded $f
    if B0 = $55 then ledswing 'manchester encoded $0
    if B0 = $5a then led1toggle 'manchester encoded $1
    if B0 = $65 then led2toggle 'manchester encoded $2

    goto start

    led1toggle:
    if porta.0 = 1 then
    porta.0 = 0
    else
    porta.0 = 1
    endif
    goto start

    led2toggle:
    if porta.1 = 1 then
    porta.1 = 0
    else
    porta.1 = 1
    endif
    goto start

    ledson:
    porta.0 = 1 : porta.1 = 1 : porta.2 = 1 : porta.3 = 1
    goto start

    ledsoff:
    porta.0 = 0 : porta.1 = 0 : porta.2 = 0 : porta.3 = 0
    goto start

    ledswing:
    porta.0 = 1 : pause 10 : porta.0 = 0
    porta.1 = 1 : pause 10 : porta.1 = 0
    porta.2 = 1 : pause 10 : porta.2 = 0
    porta.3 = 1 : pause 10 : porta.3 = 0
    goto start

    end
    Last edited by lerameur; - 3rd December 2006 at 23:56.

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Would it be posible my pic at the receiver dont recognize the data in ?
    could the USART be at cause here ?

    The programs take a lot of space, I decided to post them on my web site:
    http://www3.sympatico.ca/lerameur/

    k
    Last edited by lerameur; - 4th December 2006 at 03:43.

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. Strange SerOut Problem
    By masosi in forum mel PIC BASIC Pro
    Replies: 39
    Last Post: - 23rd April 2007, 06:06
  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