Visualizzazione post con etichetta robot. Mostra tutti i post
Visualizzazione post con etichetta robot. Mostra tutti i post

sabato 23 marzo 2013

How to use 4 HARDWARE PWM on a PIC @ 50hz


simplified block diagram of PWM operation 
(from PIC 16F1509 datasheet)
Do you need to use a servomotor with a PIC (with the PWM modules integrated in it)? it could be a problem, since servomotor works around 50Hz, which is a really-slow frequency.

I'll use the PIC 16F1509, teach you the basics, so you can arrange the code to other PICs too.

My new project (lucky me) needs 4 hardware implemented PWM source, but I noticed that the pic microcontrollers usually have just 2 or 3 PWM modules. then I discovered this useful page: http://www.microchip.com/maps/Microcontroller.aspx which allows you to perform a parametric search over the complex pic-world. I ended up with the PIC 16F1509, which seems to be perfect: USART, 4PWM, comparator, 18 I/O pins, ADCs AND software selectable frequency for the internal oscillator!


domenica 20 marzo 2011

Interfaccia mouse ottico e PIC


se volete linkare, copiare, usare ecc ecc quello che c'è scritto in questo articolo potete farlo, ma citando l'autore.
non mi assumo responsabilità per danni a mouse, robot o alle vostre persone XD
e SI, sono io che ho pubblicato questo articolo anche su grix, quindi non l'ho copiato, è roba mia!

OK, COMINCIAMO! :)
Per un robot che sto costruendo avevo bisogno di un sensore di movimento preciso ed economico... cosa meglio di un mouse ottico? solo che il pic che stavo usando non ha controller usb...