Compromise 1: Pin doubling....
- To bring the equivalent functionality out to the appropriate pins, we have had to, in some cases, pair pins together. Use would normally consist of configuring the unused pin in a high z mode.
- Most of these have been ADC pins. Our current design calls for a 500 ohm resistor in the ADC lines of doubled pins, to avoid pin to pin shorting issues. Our thoughts on this were: the Adc is high-Z anyway, so .5k should not be too big of a deal, and if it is, a non doubled pin could be used instead.
- In 2 cases, however, we have had to double up pins that were non ADC related. For these we have PWM functionality paired with SPI SS0 and PWM functionality paired with MOSI0.
- In these cases, we think that the best option will be to put the antishort resistor in the PWM rather than the interface pins....but we are very open to discussion on the issue.
- A cool idea is to use the .5k resistor as a voltage divider....to directly read resistance. Connect the pin doubled ADC to the resistance you want to read, supply power (or ground) from the doubled pin, read the ADC voltage with the far end of the test resistance connected to the opposite rail.
Compromise 2: Port fragmentation
- For similar reasons as above, we have had to break ports up into chunks. We have attempted to keep GPIO ports as contiguous as possible, but that isn't saying much in this case.
- Our solution is to write a library function that creates accesses fragmented ports as if they were contiguous, provisioning a "virtual" port when portwide access is required.
- This would either require calling a read or write function, or passing a function as a parameter.
- The ports could still be accessed directly, of course.
Chip selection...
To maintain full 5v compatibility, we have tentatively chosen the Nuvoton NUC100LE3AN. Another choice that fits all requirements, except for 5v output, would be the ST32F1038. The ST part is 5v input compatible. Our requirements are: 7mm x 7mm package or smaller, less than $5, can achieve close to 50MHZ on a 16mhz crystal, 128k+ flash, 16K+ Ram, and all the peripherals required for matching the ATmega328p as closely as possible. Comments?
Viva la evolution!!
No comments:
Post a Comment