View Single Post
Old 12-08-2010, 03:33 PM   #25 (permalink)
bobski
EcoModding Apprentice
 
Join Date: Jan 2010
Location: Newark, DE
Posts: 143

'91 CRX - '91 Honda CRX DX
90 day: 34.91 mpg (US)
Thanks: 0
Thanked 14 Times in 14 Posts
Quote:
Originally Posted by dcb View Post
looking at the 328 schematic, I see 2 analog and 2 pwm pins, and rx and tx if you don't need a bootloader
[...]
I understand that you are targeting the arduino platform
Right. I was ruling out special-purpose pins like rx(0), tx(1) and I seem to recall the pin with an attached on-board LED having something to do with programming, but I see now that's pin 13 which is in use by the LCD. So yeah, there's two digital pins.
My line of thought on the analog side was that if we relocate the button signals to different analog pins, then use analog 4 and 5 for I2C, all the analog inputs will be occupied.

Quote:
Originally Posted by dcb View Post
but the cpu and support components all fit nicely behind the lcd with a custom pcb, and the whole unit only needs 4 wires to hook up.
Which is great as a finished product but it doesn't leave any room for expansion, tinkering or innovation in general. Reorganizing things for the sake of tinkerers seems backwards right up until those tinkerers come up with some cool add-on that the average users want. At that point, the neat packaging of the finished device becomes a limitation rather than a benefit.

Quote:
Originally Posted by dcb View Post
Can you pwm the contrast/brightness via i2c?
It's possible I'm sure, but the chip I listed won't do it. If you're willing to step away from chips with a hard-wired purpose, the ATtiny series (the ATmega's little brother) has similar analog input, digital I/O, PWM and I2C capabilities, but in a smaller footprint. The largest chip design (ATtiny*61A) is a 20 pin standard-width DIP package with 16 I/O lines, 11 of which have 10-bit ADC functionality, and 3 PWM channels on 6 pins (3 inverting, 3 non-inverting outputs). 2, 4 or 8k of in-system programmable flash storage (the * in the part number), 128, 256 or 512 bytes of ram (respectively), an on-board oscillator running at up to 20 Mhz, external and internal interrupt sources, on-chip temperature sensor, etc., etc., etc.
This all comes down to about $3/chip. The smaller (mostly just fewer I/O lines) go for as little as $2/chip. They sound awesome but I doubt the Arduino IDE supports them (in spite of them sharing AVR architecture), and I don't like the thought of programming serial comms in assembly.

Last edited by bobski; 12-08-2010 at 03:42 PM..
  Reply With Quote