Serout problem


Results 1 to 40 of 95

Thread: Serout problem

Threaded View

  1. #24
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    A couple of notes:

    TRISA = 0 'outpu <------ might only set porta.0 as an output(?)
    use TRISA = %00000000 to make sure

    TRISB = 1 'input <------ will only set portb.0 as an input
    use TRISB = %11111111 to make sure all
    of port B is set to input

    start:
    serin PORTB.3,n2400,[B0]
    pause 1 <------ don't pause here, you want to read the serial
    and get done what you want done and get
    back to reading the serial port as quick as
    possible

    if B0 = $aa then led1
    if B0 = $aa then led2
    if B0 = $5a then led3
    if B0 = $5a then led4

    goto loop

    led1:
    porta.0 =1
    pause 200 <----------- take out all these pause 200 lines
    goto start

    led2:
    porta.1 =1
    goto start

    led3:
    porta.2 =1
    goto start

    led4:
    porta.3 =1
    goto start

    loop:
    porta.0 =1

    goto start
    end[/QUOTE]


    And you last post, 'where is the serin command?'. I'm using the hardware serial port driven by the 'on interrupt' command. Read the PBP manual a bit on it, then read the datasheets on the serial port and interrupts.
    Give me a few minutes. I'll rework your code into something useful.
    JDG
    Last edited by skimask; - 2nd December 2006 at 16:53.

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