go away spammer

Author Topic: 11 pwm out, 8 pwm in, 8 ADC in, and a USB I/O to PC on ATMega128 - possible?  (Read 2390 times)

0 Members and 1 Guest are viewing this topic.

Offline nickTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Hi I am planning to build a circuit using ATmega128 (with 16MHz ext osc = 16MIPS?!) to achieve this:

11 pwm outputs - to servos, 50Hz
8 pwm inputs - from JR DS10RS Receiver (by polling pins continuously, not interrupt)
8 ADC inputs  - read rpm, voltage..
1 USB in/out - by AVR-USB

this 128 is dedicated in 'only' the tasks listed above, is it computationally feasible??
I am wondering if the servos will act weird :p

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
What kind of resolution do you expect by polling?

Offline nickTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
10-bit, possible?

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
You want 10-bit resolution by polling? You will have to poll 1024 times in 1ms. It's doable but you won't be able to do much else while doing the polling. Not to mention that if the PWM channels aren't edge aligned you will pretty much have to poll the whole time. I see that as your biggest challenge, the rest of the stuff is just pretty mundane if you use the onboard hardware to your advantage.

Personally I would use Interrupt pins and set up a timer for whatever resolution I wanted, but that's not popular around here so you may want to ask how someone else would do it.

Offline nickTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Right.... this is one of my concerns.
What about using ONE interrupt on 1 pwm and read 8 pwm channels with 10-bit resolution??

 


Get Your Ad Here

data_list