Serout problem


Closed Thread
Results 1 to 40 of 95

Thread: Serout problem

Hybrid View

  1. #1
    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.

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I am going to pause and start on it on friday or saturday,
    I will come back with a ll the details, I also want to do some more reading before going on further.
    I have been told that bread board do create a capacitive effect. But if I am getting something good with the encoders, I guess should be able to get something good also without the encoders.
    I just saw a similar kit here:
    http://www.robotshop.ca/home/product...ity-tx-rx.html
    I might try them out just for fun

    ken

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    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.
    True, but I've made some really sloppy stuff with the Rentron RF Tx and Rx modules (sloppy as in electrically sloppy, not to mention the wiring looked like a rats nest), and it's always worked fine, albiet the range suffered because of the way it was put together. And the RF itself is constrained to the modules, it doesn't flow onto the breadboard (well, except for whatever is induced).
    I'm almost positive there is something more fundamental, more basic, going on with the way he's setting things up (kinda like the familiar 'not turning off the comparators' thing).
    Hopefully, we'll get it ironed out soon...
    JDG

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    ok here the code:

    Include "modedefs.bas"
    DEFINE OSC 20 '20Mhz Oscillator was used

    ADCON0 = 0 'AD MODULE OFF & CONSUMES NO CURRENT
    ADCON1=7
    CMCON = 7 'COMPARATORS OFF
    TRISB = %00000000 'PORTB OUTPUTS

    START:
    serout portb.2,n2400,[$AA]
    Pause 100
    GOTO START

    When I change the serout to serout2 , its worst. I am not getting a lot out the output pin, I also tried pin9 for output.

    I have a outpu 20Mhz crstal on port 15 and 16
    MCLR with a resistor to Vdd
    Vdd on 14
    ground on 5
    wire from 8 to input of TX module

    ken

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur
    ok here the code:

    Include "modedefs.bas"
    DEFINE OSC 20 '20Mhz Oscillator was used

    ADCON0 = 0 'AD MODULE OFF & CONSUMES NO CURRENT
    ADCON1=7
    CMCON = 7 'COMPARATORS OFF
    TRISB = %00000000 'PORTB OUTPUTS

    START:
    serout portb.2,n2400,[$AA]
    Pause 100
    GOTO START

    When I change the serout to serout2 , its worst. I am not getting a lot out the output pin, I also tried pin9 for output.

    I have a outpu 20Mhz crstal on port 15 and 16
    MCLR with a resistor to Vdd
    Vdd on 14
    ground on 5
    wire from 8 to input of TX module

    ken




    I see the problem right away. Remember when I said that the receiver needs to be trained (take a bit of time and read back there somewhere)? Well, you're sending one character, waiting 100ms, then sending another, waiting another 100ms...etc.
    That 100ms is WAYYYY too long. Change that pause to less than 5ms, and then look at your datastream at the receiver.

    Try this-----


    START:
    serout portb.2, n2400, [ $aa, $aa, $aa, $aa, $aa ]
    Pause 1
    serout portb.2, n2400, [ $0F, $F0 ]
    Pause 1
    GOTO START

    The 4 $AA's will take 16.6ms to transmit and probably won't match the transmitter output very well. Do not worry about that, it's ok, that's why we're training the receiver. It's completely normal.

    After a few cycles, the $0F and $F0 should be clearly visible and practically match the transmitter output (because we've trained the receiver). The $0F and $F0 will take about 8.3ms to complete, then there will be a 1 ms pause, then the sequence will start over.

    You should be able to see an obvious difference between the $AA's and the $0F and $F0.
    This should work just fine. Let me know what happens...
    JDG
    Last edited by skimask; - 1st December 2006 at 03:10.

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    yes its working, Thank You !!!
    I just assumed that because I dont have a receiver chip i did not need the training session .
    I tried it without just to see and it works, But I will use it.

    Also , I did not see any pause in your code
    serout2 dataout , 84 , [ REP key \ 2 ] 'serout2
    how does yours work ?
    also i wandered around on google and did see anyone using a pause that long. Like here, they use 1 sec pause:http://www.imagesco.com/articles/lcd/05.html

    Ken

  7. #7
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    O my !
    I just realize there button edit on this site
    I was sure you put this pause
    PauseUS 1660 '<----notice the change to pauseUS
    and I could not see it anymore, then I saw the edit button,
    I thought for a while I was in an episode of the twilight zone..
    unless you did not edit it....

    k

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur
    yes its working, Thank You !!!
    I just assumed that because I dont have a receiver chip i did not need the training session .
    I tried it without just to see and it works, But I will use it.

    Also , I did not see any pause in your code
    serout2 dataout , 84 , [ REP key \ 2 ] 'serout2
    how does yours work ?
    also i wandered around on google and did see anyone using a pause that long. Like here, they use 1 sec pause:http://www.imagesco.com/articles/lcd/05.html

    Ken

    The first pause is just to let the LCD startup, you only need it once. The second one is there for no reason other than to be there and provide a bit of delay so you can see what is going on.
    As far as the code goes, what you see is what you get. I don't have anything hidden in there, nothing special is going on...
    JDG

  9. #9
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I,,
    I was looking at your receiving code, and I could not see any serial in command. What are you using instead ?

    ken

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