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

    O k starting from scratches..
    I manages to do 2 different programs which dont work.
    here: http://www3.sympatico.ca/lerameur/
    do I need to configure SSPCON, or the RCSTA registers ?

    Also in your RX4.bas (maybe it was RX6.bas), you have
    Serin PortB.3, 16780, [B0]
    ----shouldn't that be serin2?
    I tried both , so many combinations....

    k
    Last edited by lerameur; - 5th December 2006 at 02:51.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur
    O k starting from scratches..
    I manages to do 2 different programs which dont work.
    here: http://www3.sympatico.ca/lerameur/
    do I need to configure SSPCON, or the RCSTA registers ?

    Also in your RX4.bas (maybe it was RX6.bas), you have
    Serin PortB.3, 16780, [B0]
    ----shouldn't that be serin2?
    I tried both , so many combinations....

    k


    Did you get the LEDs to light up in sequence as described in the earlier post?
    And if you didn't, then why are you worried about the SSPCON or RCSTA registers... and why are you worried about those 2 registers in the first place? You're using a software-based serial commands, not hardware.
    Priorities, man, priorities....

    And after further checking.....................
    If you'd check your ttt program and read the PIC datasheet, you'll notice that RA.4 is an open-drain output...you'll never get a high logic level from it...
    If you'd check your rrr program and read the PIC datasheet, you'll notice that the TRIS statements are wrong...

    Don't assume something is broke when you just plain haven't looked hard enough... Come on,,, get on it... Get this thing working by tomorrow!!! or else!!!
    Last edited by skimask; - 5th December 2006 at 03:05.

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Nothing is working,
    Well the testing led part in the program works. thats it.
    The loop is looping, but as soon as I put the wire to the input port, then the signal disappear. AND no leds lighting

    k
    Last edited by lerameur; - 5th December 2006 at 03:06.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Ok, Ok, Ok,.............................
    Here we go again.....................
    This is getting annoying............
    There is something getting messed up somewhere, something you aren't telling me, something you are doing ahead of time, something you aren't doing in a logical sequence, something somewhere...........so.......

    Answer these 2 questions:

    1. What hardware do you have? List the PICs, the crystals, the LEDs, the TX, the RX, the switches, the pot, etc. and so and so....

    2. What is your 'master plan'? Do you intend to transfer data between 2 PICs wirelessly? Do you intend to just control a couple of LEDs wirelessly? What?

    JDG

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    1. What hardware do you have? List the PICs, the crystals, the LEDs, the TX, the RX, the switches, the pot, etc. and so and so....
    Pic16F88, 20Mhz crystals, Led out on portA.0,1,2 and 3
    MCRL on PORTA.5, ground pin, Vdd on 5v. NO pot, no switch, Just a wire going from PortB3 (output of serout) going to portA.4 (serin)
    if serin.. well
    START:
    B0 =0
    serout portB.3,n2400, [ $0F, $0F, $0F, $0F, $0F, $0F, $0F ]
    serin portA.4,n2400, [B0 ]
    if (B0 = $0F) then
    porta.2 =1
    pause 100
    porta.2 =0
    else
    goto start
    endif
    GOTO START

    2. What is your 'master plan'? Do you intend to transfer data between 2 PICs wirelessly? Do you intend to just control a couple of LEDs wirelessly? What?
    I want to transfer data to about 200feet between two pics.

    Go back to my web site, I posted a picture of the circuit
    thanks for your time
    ken

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur
    1. What hardware do you have? List the PICs, the crystals, the LEDs, the TX, the RX, the switches, the pot, etc. and so and so....
    Pic16F88, 20Mhz crystals, Led out on portA.0,1,2 and 3

    2. What is your 'master plan'? Do you intend to transfer data between 2 PICs wirelessly? Do you intend to just control a couple of LEDs wirelessly? What?
    I want to transfer data to about 200feet between two pics.

    ken
    Ok, still a lot of information missing. Is the 16F88 your transmitter or receiver PIC? You posted what I assume is the 'transmitter' code, what about the receiver hardware and/or code...in fact, don't worry about the code for right now. We're going to make sure your hardware is hooked up right.
    (P.S. I'm only going to be here for the next 1/2 hour, until 10pm CST)


    And another thing, you are using a software based serial solution, also called 'bit-banging'. By the time your serout is done, all the data is transmitted. It's not buffered anywhere. It's not done in hardware. It's like trying to use 2 telephones to talk to yourself in different rooms. You talk into one phone, run to the other room and wait for your voice to come out. It isn't going to happen. Serin doesn't have anything to do but wait for nothing. Not going to work....
    Last edited by skimask; - 5th December 2006 at 04:30.

  7. #7
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    well from what you said before:
    5. Make sure the button works...in other words, you push it and an LED connected to the same PIC on a different pin lights up on software command

    I went real simple as you told me.
    So this pic is the only pic, emitting AND receiving, the yellow wire is from sending to receiving.

    k

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