Serin usage?


Closed Thread
Results 1 to 15 of 15

Thread: Serin usage?

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by champion View Post
    Skimask, we get it. You know what you're doing with a PIC, but it's not helping anyone to brag about what you can do or have done. This site is about helping people work out their issues with projects relating to the PIC and MELabs stuff. If you have a suggestion, please let me and the others know. But just bragging is a little lame. Also, my issue has to deal with the output of the encoder not generating enough ppr to have the kind of revolution that I need, thus requiring a quadrature decoder to increase the ppr of the encoder. I have no doubt that the PIC will be able to handle the pulses after that. The thing I can't figure out now is how to interface the decoder with the PIC from the PicBasic code side. Thanks for your help and I hope someone has an idea as to what I could try as far as the code to implement this contraption goes.
    >Skimask, we get it.
    We may get it, but you apparently haven't yet...
    And I ain't braggin' 'bout squat... I haven't done anything miraculous or extraordinary or anything new and fantastic that anybody else has already done a dozen times. So...WAAAAAAAAAHHHHHHH!!!!

    So, be that as it may, if you are having trouble with the decoder, get rid of it. IF you can make a PIC do the work of this optical encoder, and IF you can figure out how to transmit data between 2 PICs, then MAYBE, just MAYBE you could set up one PIC running at high speed doing nothing but reading the optical encoder and POSSIBLY send that data to another PIC to do work for you instead of a single PIC handling everything (which again, shouldn't be a problem in the first place). But with 2 PICs, you'd be splitting up the tasks into managable chunks.

    And I'm out....

  2. #2
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    > if you are having trouble with the decoder, get rid of it. IF you can make a PIC do the work of this optical encoder
    Um, what are you talking about? How should I measure angular position with the very high accuracy I need without an encoder? How am I gonna have the PIC do the work of the encoder? Youre lost.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by champion View Post
    Um, what are you talking about? How should I measure angular position with the very high accuracy I need without an encoder? How am I gonna have the PIC do the work of the encoder? Youre lost.
    Yep, you're right, I am completely lost...After reading through the datasheet linked above and for teh 2122-5 itself, I found that what you're trying to do is physically impossible without a decoder/counter chip in between the PIC and the encoder. After all, who would've ever thought of using a couple of the interrupts and registers on a PIC to detect level changes on the outputs of an optical encoder. 'cause that would just be silly.

    NOT! There are loads of 'google-able' references out there for directly connecting a quad-encoder to a PIC, with very high resolution/accuracy (which is obviously dependant upon the encoder itself), AND easily complete other tasks at the same time, all without missing pulses from multiple encoders...but I give up. Sometimes ya just can't tell a person anything.

  4. #4
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Thumbs down Skimask is the man!!!

    Quote Originally Posted by skimask View Post
    Yep, you're right, I am completely lost...After reading through the datasheet linked above and for teh 2122-5 itself, I found that what you're trying to do is physically impossible without a decoder/counter chip in between the PIC and the encoder. After all, who would've ever thought of using a couple of the interrupts and registers on a PIC to detect level changes on the outputs of an optical encoder. 'cause that would just be silly.

    NOT! There are loads of 'google-able' references out there for directly connecting a quad-encoder to a PIC, with very high resolution/accuracy (which is obviously dependant upon the encoder itself), AND easily complete other tasks at the same time, all without missing pulses from multiple encoders...but I give up. Sometimes ya just can't tell a person anything.
    Skimask, I don't think that you have read about my problem. I believe I said before that I need a resolution of at least 360*60=21600 pulses per revolution. Okay, try and find an encoder that has more than 8192 ppr for less than $100. You can't. Then I guess you could use a quadrature decoder along with the encoder to increase the resolution. There you have 8192*4=32768 ppr. That's enough resolution. So what is it that you think that is physically impossible? Didn't you read above that I was using a decoder? And why do you keep talking about missing pulses or any need for a higher frequency oscillator? I think you're probably a smart guy so that's why I must assume that you are simply not reading the entire thread carefully. Go back and read through all of the posts before you make any more comments. k?

    PS. I now have the entire system up and running right now, so thanks for all of your help. You rock!!!

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by champion View Post
    Skimask, I don't think that you have read about my problem. I believe I said before that I need a resolution of at least 360*60=21600 pulses per revolution. Okay, try and find an encoder that has more than 8192 ppr for less than $100. You can't. Then I guess you could use a quadrature decoder along with the encoder to increase the resolution. There you have 8192*4=32768 ppr. That's enough resolution. So what is it that you think that is physically impossible? Didn't you read above that I was using a decoder? And why do you keep talking about missing pulses or any need for a higher frequency oscillator? I think you're probably a smart guy so that's why I must assume that you are simply not reading the entire thread carefully. Go back and read through all of the posts before you make any more comments. k?
    Somebody's sarcasm detector is broken...
    I get it, got it, bought the movie...
    1 minute of resolution - gear reduction works too, depending on the physical application of course
    How do you increase the resolution from an encoder which only puts out X ppr?
    Missing pulses? higher oscillator? what?
    Read thru it -
    You said you have an encoder All I said was that you could save some headache, not to mention PCB space, by using a PIC with some creative programming and still have loads of accuracy at high rpm, instead of relying on a dedicated decoder/counter/shift register and probably save a couple bucks on top of it. Not only that, but you never did say what the end product might be (crank trigger, star follower, gps guided egg cracker, etc).

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Somebody's sarcasm detector is broken...
    You think so? Look again at his avatar!
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    You think so? Look again at his avatar!
    I saw that...
    I'll give 10 points for originality on that...but...
    subtract 100 points for not using a PIC where a PIC could be used...

Similar Threads

  1. Accurate serin usage?
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th July 2009, 08:36
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serin question?
    By sachymo in forum General
    Replies: 5
    Last Post: - 27th July 2008, 10:04
  4. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  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