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

    hi,

    I only had time to try one thing. I put a simple command with a decimal number and I included the encoder.
    check it out:
    http://www3.sympatico.ca/lerameur/

    It is good, but the transmitter is right beside the receiver, I would expect a better reception, When I wil be putting this 100feet away, I am afraid I wont get a signal.
    Also, I would like to get it working without the encoder. I want to understand why the way I was trying do not work.

    ken

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur
    hi,

    I only had time to try one thing. I put a simple command with a decimal number and I included the encoder.
    check it out:
    http://www3.sympatico.ca/lerameur/

    It is good, but the transmitter is right beside the receiver, I would expect a better reception, When I wil be putting this 100feet away, I am afraid I wont get a signal.
    Also, I would like to get it working without the encoder. I want to understand why the way I was trying do not work.

    ken
    I think it should've worked. I get the same type of output with the bit of roughness on the trailing edge of the pulses like you had before. BUT, the firmware in my receiving PIC gets the bytes just fine (remember the serial module in the PIC does a bit of oversampling of the bits, so if the leading or trailing edge is a bit messy, it won't matter much).
    You might be too worried about the fact that the TX and RX signals aren't exact 100% matches of each other and not worried enough if the code in the receiving PIC works in the first place.
    Have you tried making the Tx-PIC talk to the Rx-PIC without the wireless modules (or the encoder/decoder) in the middle? Does that work? If not, you probably have something wrong with your code.
    Also, have you actually tried putting some distance between the modules to see if the receiving signal changes much? It might not...
    JDG

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I want to try all of this, and will this week end, I just one interesing fact. When I use the pic, I can see that one byte is about 5ms. When I use the pic directly, the byte is 300us. I guess I need to slow it down, that is the case even at slow baud rate:
    serout2 portb.3,n1200, [01010101]
    I saw a command that actually slow he bit rate between every bit, They added this in the beginning of the program, I just remember reading it, cant remember where, is this possible ?
    My whole program is this

    Include "modedefs.bas"
    DEFINE OSC 20 '20Mhz Oscillator was used
    Start:
    serout2 portb.3,n1200, [01010101]
    GOTO START

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I was looking at the HSERIN command..

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur
    I want to try all of this, and will this week end, I just one interesing fact. When I use the pic, I can see that one byte is about 5ms. When I use the pic directly, the byte is 300us. I guess I need to slow it down, that is the case even at slow baud rate:
    serout2 portb.3,n1200, [01010101]
    I saw a command that actually slow he bit rate between every bit, They added this in the beginning of the program, I just remember reading it, cant remember where, is this possible ?
    My whole program is this

    Include "modedefs.bas"
    DEFINE OSC 20 '20Mhz Oscillator was used
    Start:
    serout2 portb.3,n1200, [01010101]
    GOTO START

    Shouldn't that be [ %01010101 ] ? With a % sign in front of the binary number? The way you have it, PBP is trying to send an overflowed large number (I think, not sure), but it sure not a $55 like you had intended.

    For the DEFINE that slows things down (character pacing), don't use values any higher than 1 or 2 ms if you're NOT using the encoder/decoder modules. If the pacing value is any higher, you have to 'retrain' the receiver by sending another preamble sequence (because the data slicer gets either charged or discharged in that amount of time).

    And again, if you're using the encoder/decoder modules, it won't matter.

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Ok sorry , it was a typo, I have $AA in my code, I just wanted to make things clearer and made a mistake while posting.

    And again, if you're using the encoder/decoder modules, it won't matter.
    so you mean I DO need spacing?
    Like I said the pulses are much faster coming out the pic then the encoder.
    what is the speed you get when sending out on a wireless ?

    ken

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    All right....in explicit detail....write down and/or take/post pictures of what you've got so far; transmitter schematic, receiver schematic, transmitter firmware (PBP), receiver firmware (PBP) and other relavent facts.

    And unless I've missed it, all I see is the fact that you are probing your receiver output while you are sending repeat bytes into the transmitter. I don't see anything saying that a PIC is connected to the receiver itself... That is what I've been wanting to know all along. What is the receiving PIC doing about all these signals...not what your 'scope is doing about them...

    'cause quite frankly, that PBP software posted earlier by me and the schematics from Rentron should work just fine and like I said, and even though the modules aren't rated for it, I can get them to work at 9,600 baud reliably (19,200 intermittently). And this is all on a solderless plug-in type breadboard, nothing special about the circuit. And it works out to a few hundred feet.

    Unless you messed with the tuning adjustment on the receiver (like I did on one of my modules and it took me literally days to get it back into adjustment), then all bets are off...

    JDG

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


    Did you find this post helpful? Yes | No

    Default

    just my 2 cents, not on the code but... RF and breadboard are poor friends.. you really want to monitor what goes out of your receiver before using it. You may need to clean the signal before.

    Once again, RF and breadboard are poor friends.
    Steve

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

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