Serin serout problem


Closed Thread
Results 1 to 40 of 337

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    HI,
    I dont have to use more then one for this project, But I had this problem before and did not persue into it, so I asked the question just on the way. I read on a site, just like you said, adding a capacitor to the output of the sensor or battery will help. The thing I dont know why it works, I tried these two program they both works, just dont know why the program with just one ADCON0 works

    Two Adcon
    ADCON0 = %10000001 ' Configure and turn on A/D Module
    ADCIN porta.0, input1
    pause 50

    ADCON0 = %10001001 ' Configure and turn on A/D Module
    ADCIN porta.1, input2
    pause 50


    One ADCON0
    ADCON0 = %10000001 ' Configure and turn on A/D Module
    ADCIN porta.0, input1
    ADCIN porta.1, input2
    pause 50

    See they both work, but I did not configure port A.1.. why ?
    You're using the ADCIN command. Ya think maybe PBP sets it up for ya?
    I know the PBP manual doesn't explicitly say it that it sets it up for you, but it does say that ADCIN reads the 'channel' and also says all you have to do is set the required pins to inputs, it doesn't really say to select the channel you want to sample... I suppose the manual could be a little more informative in this respect.
    I just looked at the ADC section of the 'F88. It's a bit different than some of the other PICs. Not only do you have to TRIS the pins you want to inputs, but you also have to enable the A/D in the ANSEL register. I don't know if PBP does this for you or not.
    You can easily check for that in your .lst file after compiling the program. Just put a comment around the line you're wanting to check and search for that comment in the .lst file. Should make it a bit easier for ya...

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    hi,

    Ok I got the A/D working now.

    I bought another RF module kit from this web site:
    http://www.robotshop.ca/home/product...ity-tx-rx.html
    ( actuallyI just had to drive there).
    I use the exact program and configuraiton and I am getting contact output on the lcd :
    TempC : 0
    TempF: 32

    here is what I see on the scope:
    http://www3.sympatico.ca/lerameur/
    Last edited by lerameur; - 4th January 2007 at 17:27.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    hi,

    Ok I got the A/D working now.

    I bought another RF module kit from this web site:
    http://www.robotshop.ca/home/product...ity-tx-rx.html
    ( actuallyI just had to drive there).
    I use the exact program and configuraiton and I am getting no ouput
    here is what I see on the scope:
    http://www3.sympatico.ca/lerameur/
    A/D is working as expected? Values are what you need and all that?

    RF Modules - sounds like you should take them back and get another pair of the same thing you've already got.

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I bought three pair of them , They all act the same...
    it looks ok from the scope doesn't it ??

    A/D is working as expected? Values are what you need and all that?
    Yes
    Last edited by lerameur; - 4th January 2007 at 17:49.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    I bought three pair of them , They all act the same...
    it looks ok from the scope doesn't it ??

    A/D is working as expected? Values are what you need and all that?
    Yes
    Put the old ones back in and snap a pic of those, put the 2 pic's up side by side. Maybe one is inverted from the other or something.

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I did that they are almost the same on the scope.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    I did that they are almost the same on the scope.
    Almost apparently isn't close enough.
    Fatten up the traces a bit if you can and repost the pics including the original RF module sets.
    Also, you might want to try speeding up the TX rate, maybe a couple more sync bytes ($55), maybe less, who knows.
    That's the problem with getting something to work with one thing, and then using another, you gotta redo practically everything.

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. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

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