The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: Chuck Simmons
Organization: You jest.
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.33 i586)
Subject: Re: Which Microcontroller to use?
Date: Fri, 20 Sep 2002 00:29:47 GMT
NNTP-Posting-Date: Thu, 19 Sep 2002 17:29:47 PDT
Mike Poulton wrote:
> On 19 Sep 2002, email@example.com (Derek Agar) said:
> > Hello,
> > I am an EE student involved in a Senior Design class. While I have
> > had low level digitan design (constructing adders/subtractors ... from
> > gates), and have done some simple programming on a gal16v8 FPGA, I
> > have not done much more than that.
> > My question is what would be a good microcontroller (or should i look
> > to a good fgpa) to use for my design?
> > My group is implementing a car that follows another car based on
> > sonar. The microcontroller needs to:
> > 1) Output a 35khz signal and a 45khz signal for about 250us
> > (simultaneously)
> This should probably be done by external hardware, not the
> microcontroller. It will be hard to do with most uC devices, and the
> output will need lots of signal conditioning and amplification to drive
> a transducer anyways. Better to use a dedicated driver circuit
> triggered by a pulse from the uC. This will require only a bit more
> hardware, and will drastically reduce the microcontroller's load. It
> will also make programming way easier.
> > 2) Send a signal to Reset the voltage trigger.
> > 3) Start a counter/timer and wait for the 2 responses to get back.
> > (stop the car if no responses after 40ms)
> > 4) Fill the 2 registers with the value of the timer at the time of the
> > response
> > 5) After the 2nd response comes back, calculate the distance that the
> > car is away from the lead car and determine if the car needs to speed
> > up/slow down/stay constant and send this value to a Pulse code
> > modulator that will drive the motor.
> Some PIC microcontrollers have built-in PWM drivers. Alternatively, you
> could use an electronic speed control designed for RC cars. These
> accept a low-frequency PWM signal that is very easily generated by your
> code, and can handle lots of power.
> > 6) Also determine if one of the sensors is detecting that it is
> > further away than the other and how much and drive a stepper motor to
> > control the steering.
> Using a separate micro to drive the motor may be the way to go. While a
> PIC at 40MHz could certainly handle the stepper, PWM, and sensors, it
> may be much easier to use an outboard uC for the stepper control.
> Either way, you will probably need some kind of position sensor for the
> stepper (to make it a servo) in order to get decent control.
> Alternatively, you could use a big servo designed for RC cars (or RC
> sailboats -- they have HUGE servos) to do the steering. They accept the
> same 50Hz PWM signal as the speed controls. Doing that would simplify
> your design greatly.
> > I don't see speed of the processor as being an issue (we are looking
> > at a 1MHz crystal and most of the microcontrollers that I looked at
> > will do way above that)
> If you actually want to produce two clean ultrasonic signals
> simultaneously, you will need some serious speed. That's not a trivial
> task. If you want to do PWM for the motor drive while simultaneously
> doing other stuff, that will require either hardware PWM, or serious
> speed. I'd go with hardware. If you give both of these tasks to
> hardware, your requirements are trivial -- almost any uC could do it.
> If you want to do all of this with software, I don't think any of the
> PIC's would cut it, even at 40MHz. Something from Scenix might work,
> but it would be more hassle than it's worth. Hardware is easier. I'd
> start looking at the PIC microcontrollers. If you can use an RC speed
> controller and servo, then you only need 6 I/O lines -- T and R for each
> ultrasonic device, plus one for the speed control and one for the servo.
> The PIC12F675 is an 8-pin PIC microcontroller that is quite capable of
> doing all that stuff. You would be using all six I/O pins. If you want
> more flexibility, the PIC18Fx series would be more than powerful enough.
> > We are looking at having an external voltage trigger, so we may not
> > need a voltage comparator.
> > I have done some C programming and would find that easier than to get
> > into assembly language, but I am not against it.
> I would be against it! For a program this simple, there is no need for
> assembly. All the functions han be handled through a C or BASIC
There is something seriously backwards here. The reason for using high
level languages is to handle complex functions easily. Optimizing C
compilers are in fashion and for excellent reasons. Assembly language is
used for speed in simple functions or in cases where nothing else is
available. Complex functions are painful to write in assembly language
and hard to debug.
... The times have been,
That, when the brains were out,
the man would die. ... Macbeth
Chuck Simmons firstname.lastname@example.org
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup