Microcontroller: ZX24s
I'm using Arduino Library with my microcontroller.
I tried yesterday to use analogWrite Function to test a single LED with the Arduino Fade example. Unfortunately I figured out that all pins were working as digital. Pin D.5 & D.7 which are the LEDs on microcontroller can be used as analog output. Can I use other pins as analog ?
Analog Output
Re: Analog Output
The "analog output" function is nothing more than PWM. PWM is only supported on certain pins that have an alternate function as timer output compare signals, the number and location of which depend on the particular device being used.geocool wrote:Can I use other pins as analog ?
On a mega1284P-based ZX like the ZX-24s, analog output is possible on B.6 and B.7 (Timer3), D.4 and D.5 (Timer1), D.6 and D.7 (Timer2).
- Don Kinzer
B.6 and B.7 are the MISO and SCK pins, respectively. They are available on the row of holes along the pin 1/24 end of the ZX-24 board. Take a look at the schematic.geocool wrote:[T]here is not any association with B.6 & B.7 Ports on any of 24 pins, is that right ?.
You've identified a shortcoming of using the 24-pin format, i.e., not all pins are conveniently accessible. Although it's a little more work to set up initially, the 40-pin DIP devices provide convenient access to all 32 I/O pins.
- Don Kinzer