View Single Post
Old Jan 18, 2004, 04:42 AM
mmormota is offline
Find More Posts by mmormota
Registered User
mmormota's Avatar
Joined Jul 2003
2,606 Posts
Originally posted by mr_wood
should I be checking the sensors in interups or just in the main loop ? What sort of clock speed should I use and what is a good cheap PIC for this sort of task - I'd only need 3 bit input, 3 bit output (perhaps an A/D too ) and enough clock speed to enable to motor to run - what do you reckon ???
Probably the best method with a not very fast controller:
- assembly, not even dream about C
- handle the receiver with IT and a timer, keep the IT routine as simple and fast as possible
- handle the phase detectors and the driver outputs in the main loop
- the job is not easy (hard for the first uC project)

You need 6 outputs, the series Fets need break-before-make drive to avoid high current spikes.

This is a complex development, I can't estimate the clock speed without a lot of calculations. If you decided to use a uC family, use the fastest member, and lower the clock later, if it seems possible. A 20MHz Pic seems to be fast enough, but it is just a feeling... (a Pic unfortunately needs 4 clocks for 1 instruction cycle)
Microchit offers sample code for sensored controllers too. While I am a bit skeptic about the sensorless code, I am sure the sensored is perfect. (and you can try the sensorless code on the same hw...)
mmormota is offline Find More Posts by mmormota
Last edited by mmormota; Jan 18, 2004 at 04:50 AM.
Reply With Quote