----- Original Message ----- From: "James James" > Mike Young wrote: "I missed the preceding discussion, > so don't know what was suggested. You can drive each > half using just one PWM per bridge ." > > James: Yes, but I am using TWO L298 ICs and each IC > has two full-bridges. So the total is "4 half", which > means I will need 4 PWM channels, right? That's right, one PWM for each bridge. Four bridges, four PWM. Four independent PWM if you're controlling 4 motors. You can use fewer if you're controlling, say, two steppers instead. > Julio Jumpa wrote: "you set an interruption every > 8us." > > James: This would work, but the PIC will have to > spend a lot of time servicing the interrupts. It > might not have enough time to update the LCD, read > encoder, do some math, serial comm, etc. I am > thinking of a dedicated PIC just to drive the two L298 > ICs. I keep a small bag of 12F683 and 16F690 around, like jelly-beans. I wouldn't think twice about putting one 12F per bridge on the board. But with all that going on, I'd seriously consider an AVR or ARM. The ATmega169 has dedicated LCD control, USART, 4 PWM channels, probably enough ADC, and one instruction per clock compared to PIC's 4 Tosc. The Butterfly eval board is $20, and comes with a '169 and LCD panel. If you like C, you'll find free GCC based tools, a nice change from the pay-in-blood PIC world. The serial ISP is $30; a soon to be released USB ISP is expected to be a few dollars more. It only comes in a 64 pin TQFP, which is either a deal breaker or a likable bonus. (If you don't already etch your own boards, maybe it's time to start thinking about it.) -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist