I have a couple of questions
ccake
Posts: 2
Hi All
I'm a newbie here.· I have a couple of questions about using Pics for counting and converting binary count to BCD.· I'm kinda new to these Pic processors.· I got a Basic Stamp Homework Board for Christmas. Have been going thru the book trying to learn.· Also have ordered a sampling of Picaxe chips too.· My Idea was to go to the mpu route for all my future bench test equipment projects.
My first project this year is a UHF Frequency Counter.· And I have already gotten the UHF pre-scaler (divide by 16) working.· But have been stumped trying to decide how to convert the Binary count from the prescalers back into Decimal.· Looks like regular logic ICs will require a bit of construction effort.
So my question is - can I use a pic (BS2 or Picaxe) to count down to 6-digits and convert the binary to BCD?
I want to use 6 each 7-segmant LED displays in the counter.
I kinda have an Idea what needs to be done, just need help in deciding which way to go and what hardware to use.
My initial design was to use discrete logic ICs for the counter, but I ran into a snag with the UHF prescaler. I had some trouble trying to convert the Binary count back into Decimal.· That got me to consider using either the BS2 or a Picaxe.
Any Ideas anyone?
Post Edited By Moderator (Joshua Donelson (Parallax)) : 3/12/2010 12:25:00 AM GMT
I'm a newbie here.· I have a couple of questions about using Pics for counting and converting binary count to BCD.· I'm kinda new to these Pic processors.· I got a Basic Stamp Homework Board for Christmas. Have been going thru the book trying to learn.· Also have ordered a sampling of Picaxe chips too.· My Idea was to go to the mpu route for all my future bench test equipment projects.
My first project this year is a UHF Frequency Counter.· And I have already gotten the UHF pre-scaler (divide by 16) working.· But have been stumped trying to decide how to convert the Binary count from the prescalers back into Decimal.· Looks like regular logic ICs will require a bit of construction effort.
So my question is - can I use a pic (BS2 or Picaxe) to count down to 6-digits and convert the binary to BCD?
I want to use 6 each 7-segmant LED displays in the counter.
I kinda have an Idea what needs to be done, just need help in deciding which way to go and what hardware to use.
My initial design was to use discrete logic ICs for the counter, but I ran into a snag with the UHF prescaler. I had some trouble trying to convert the Binary count back into Decimal.· That got me to consider using either the BS2 or a Picaxe.
Any Ideas anyone?
Post Edited By Moderator (Joshua Donelson (Parallax)) : 3/12/2010 12:25:00 AM GMT
Comments
Because of the interpreter, instruction execution time is much slower than that of the native PIC, on the order of 100s of microseconds for simple operations. The Stamps could be used for counting and converting binary to displayable information, but not at the speeds you sound like you need. One of the primitive operations in Stamp Basic is a COUNT statement which counts the number of pulses presented to an I/O pin during a user specified interval expressed in milliseconds and a minimum pulse width of just under 5us. Your counter would only be able to handle frequencies over 4MHz with a divide by 16 prescaler. You could certainly use an additional counter to use as a further prescaler. Another alternative would be to use a Propeller instead of a Stamp. The Propeller can easily handle the displays and can count pulses up to about 40MHz using the built-in counters.
Have been trying to find a good circuit for dividing by 25, or dividing by 125 (for the divide by 4 prescaler), to get my binary count converted back to decimal. That had caused me to wonder if the BS2 or Picaxe might work.· I don't even have the programmer downloaded yet for those 'other' chips. And still trying to do basic circuits on the BS2 breadboard.· Not smart enough yet to design any counters in basic.· And I already have all the main parts for a discrete circuit counter. I guess thats how I'll go. Until I learn more.
Someone suggested if I would divide the Time base counter by the same 'prescale' value and then gate the displays using that, then I'd be good.· It works out ok on paper. Some day I want to do such as this with micro-processors
Regards...· CCake