Choosing a Microcontroller

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
ele1200
Posts: 49
Joined: Mon Nov 11, 2002 1:01 am
Contact:

Choosing a Microcontroller

Post by ele1200 »

Hey guys,<p>Can you please suggest a pic (preferably) or a microcontroller that can loosly do the following.<p>Have about 325 bits of information sent serially to it. The unit must ignore the first 310 bits, record the next eight and ignore the last 7 bits. The eight recorded bits must be compared to a list of eight bits and if a match is found, have one of its pins go low. <p>The pic or micro. must also be able to record and store the lists (from a user input keypad) to be compared to the serial data inputted.<p>What PIC am i best off starting on? Any samples of code? Is this lots of work??<p>Thanks :confused:
bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: Choosing a Microcontroller

Post by bodgy »

Probably start with the 18F252 or 452.<p>Do you really mean bits or do you mean bytes?<p>Actually the 16F series have enough space for 40 bytes 16F876/877. However the 18F series is better to code.<p>You'd need to be a little more specific as far as what you are doing with the code,as to how difficult this may or may not be. <p>Does the incoming data need to fill a circular buffer, is the serial data synchronous or asynchronous, IC2 etc?<p>The 8 bit check is this a CRC algorithm or is a plain match. How will the PIC know that valid data is being sent to it - in other words does it just wait for a start bit or is there a header code.<p>colin
On a clear disk you can seek forever.
ele1200
Posts: 49
Joined: Mon Nov 11, 2002 1:01 am
Contact:

Re: Choosing a Microcontroller

Post by ele1200 »

Ok....the data is 8 eight binary bits, so i suppose 1 byte?<p>The first 300 bits that are to be ignored are the same all the time. Could this allow the PIC to get ready? <p>What is a circular buffer?
ele1200
Posts: 49
Joined: Mon Nov 11, 2002 1:01 am
Contact:

Re: Choosing a Microcontroller

Post by ele1200 »

Also, how would you code an ignore function? Is there an ignore function for all families of pics or just the higher memory ones?<p>For instance, does the 16f84 have an ignore function?
hlreed
Posts: 349
Joined: Wed Jan 09, 2002 1:01 am
Location: Richmond, TX
Contact:

Re: Choosing a Microcontroller

Post by hlreed »

That would be nice. You would have to say ignore something, so you have to make a test anyhow. Test for the first number you are going to use, or count them until you get to the first number.
Harold L. Reed
Microbes got brains
josmith
Posts: 340
Joined: Tue Dec 04, 2001 1:01 am
Contact:

Re: Choosing a Microcontroller

Post by josmith »

There is no actual ignore functon. YOU would have to read the data and ignore it in your program by simply doing nothing with it. you could count the number of unused reads until you get to the data you want to process.<p>I am a big fan of the Basic Stamp for starting out because it is so simple to program and use.
bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: Choosing a Microcontroller

Post by bodgy »

A circular buffer is one where the incoming data basically goes round in a circle. Used where data may come in bursts and fast and allows all the data to be read before performing whatever action needs to be taken.<p>As has already been said an ignore fuction(really useful) would have to be coded in.<p>I would be tempted to use a circular buffer in this case as it could make processing a little easier. <p>All you do is set up a loop to read in the amount of bytes and then hold onto the last but 7.<p>Are you able to say what the ignored bits look like. For example are the last 7 bits all zeroes?<p>Colin
On a clear disk you can seek forever.
ele1200
Posts: 49
Joined: Mon Nov 11, 2002 1:01 am
Contact:

Re: Choosing a Microcontroller

Post by ele1200 »

Colin,<p>The bits are <p>300 1's and 0's
200 1's
data (10 bits)
7 1's and 0's this is data as well but i dont need it
Post Reply

Who is online

Users browsing this forum: No registered users and 56 guests