Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Controlling a Servo

Status
Not open for further replies.

Covracer

New Member
Hi, I'm looking into building a simple robot (oxymoron?) that runs Linux. I've found a controller that looks good but I'm not sure what I need to operate servos. The H8/3069F has 70 input/output pins. Are these what I would use to hook up a servo? (The full specs are nicely laid out **broken link removed**.) If the servos can be controlled from these I/O pins, are there any posts or sites I should check out for a howto on connecting the servos?

Thanks a bunch![/url]
 
RC servoes only need one pin to control them. The pin outputs a Pulse Width Modulation (PWM). This is a complicated way to say that (with a square wave) the frequency stays the same but the length of the output pulses changes. The length of the pulse is proportional to the position the servo turns to. The H8 should have PWM hardware built in.

I doubt that any form of Linux will run on the H8 though. Im not sure about the specific controller you're talking about but the H8 at best is a 16 bit controller. You don't need to have an OS on a microcontroller though. For your application you can just run your program on the controller without any OS. If your really want to have an OS look for Real-Time OS (RTOS) for the H8. RTOS are very small and designed to run on uControllers with limited resources.

Brent
 
uCLinux

The reason I'm looking into the H8 is because it is capable of holding flash memory which I think would be useful. I am probably going to use **broken link removed** which although it isn't realtime (I don't think it is, anyway), it still is very small and **broken link removed**. An operating system looks good because I don't know of any other way to have self-modifying code without a ton of hassle: dealing with a file system without an OS. Also, there are more possibilities that would be great to have lying around for the future like a miniature webserver or speech capabilities (which can be built in to some linux kernels).

Thanks again,
Chris
 
It sounds like it'll work - maybe a bit overkill but that will make it a cool project.

It looks like the 3 16 bit timer counters can be set up to do PWM.

Brent
 
Great

Great! I guess I'll buy the controller then. Even if it doesn't work out as a robot controller, I'm sure I can put it to good use somehow, even if it's just a tool for leanring.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top