Friday, August 25, 2006


Serial Comms re-established on the 16F877A

I'd pretty much run out of programme memory on the 16F628A setting up the programming for the GM4 motor with shaft encoder, so I decided that this would be a good weekend to get the 16F877A, with 8 Kwords of programme memory, running again. After a few false starts and a burned out 7805 voltage regulator (pure carelessness again :-( ) I finally remembered that I was running the PIC at 20 MHz (the 16F877a doesn't have an internal crystal like the 16F628A, so I specified it for the fastest crystal it could handle) and that you have to set that on the MELabs programmer programme.

Once I did that the serial comms VB.NET app started doing echoes like a champ.

I've got 2 separate PWM channels on this bad boy so I am going to see if I can run two different plastic gearmotors off of one 754410 dual darlington chip.

Simon quite rightly pointed out that synchronizing two shaft encoded feedback dc motors could be quite a technical challenge. Certainly, if we tried to do it with two synchronized control boards using 16F628A's communicating by serial comms it could well be.

I plan on running both out of one large, fast PIC chip like the 16F877A, or if that doesn't work one of the bigger, even faster 18F models. If I can get that to work I will have that X/Y controller board talk to the extruder board via dedicated software serial lines and save the hardware UART line for the token ring that talks to the PC. That way the PC app has administrative control over the individual boards while they can talk to each other over dedicated serial lines and not clutter up the comms line of the token ring.

I've got to order a couple of the plastic gearmotors out of Canada. I think that I am going to order those GM8's instead of the GM9's (equivalent of GM4).

They have a through-the-gearbox drive shaft. The top side of the drive shaft should seat the shaft encoder very nicely. They don't cost any more than the GM4's.

Oh yeah, here's the serial comms echo programme.

Dim i As Byte

Hseropen 19200

Hserin i
Hserout i
Goto loop

It's really complicated.

I think you're onto something with that 87 controling -both- motors. In the end, it's all about syncronization - between motor and encoder, then between motors, then with extrusion head... Maybe that's why they say timing is everything! :)

I've been in the middle OS upgrading land, although most of the big stuff is done. Still looking for an RS232 port, 3 computers and not a single one to be seen. Starting to think USB...
***Starting to think USB...***

You might want to look at some of the PIC 18F's then. Many of them come with built-in USB. I haven't had any experience with them yet, though.
Yes, I think I might fool around with a small parallel port programmer, then if that teaches me something usefull, go to right up to the giant PICs with USB support.

Now I'm off to install a second OS on my old computer...
Post a Comment

Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]