New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's the process to add the ATTiny88? #22
Comments
Starting with this core: https://github.com/TCWORLD/ATTinyCore/tree/master/tiny |
I can do that. Just so I'm not making any assumptions, to program the ATTiny88 I should probably use the ArduinoISP approach? And, to confirm, a compiled (.hex) core is not necessary if I use the ArduinoISP approach, correct? |
You can use ArduinoISP, you can use an AVR-ISP, you can use any programmer you have, it doesn't make any difference. If you use the Arduino IDE, and 'Upload Using Programmer', then you don't need to worry where the hex file is, the IDE knows where it is. |
The main difficulty is if it doesn't compile, because then you have to find out why - usually it will be due to differences in the register bit names or arrangements of bits in a register. |
Any update on this? Interested in using ATTiny48/88 too. If nothing happens, I'll get my hands dirty and try to create a pins_arduino.h file myself. |
No real progress. Created a basic pins_arduino.h, and started running into some compile issues with timers. Haven't had much chance to investigate, got pulled into another project for now, and doesn't look like I can get back at until for a couple of weeks. |
I've got the ATtiny88 compiling with the TinyNoMillis core, and the I've attached the pins_arduino.h, and the updated boards.txt. GitHub tells On Wed, Jul 16, 2014 at 9:07 AM, Tom Carpenter notifications@github.com
########################################################################### Example boards.txt from...http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254/94#94http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274754985/6#6http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274820597/49#49########################################################################### attiny84at16.name=ATtiny84 @ 16 MHz (external crystal; 4.3 V BOD) The following do NOT work...attiny84at16.upload.using=avrispv2attiny84at16.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny84at16.upload.using=arduino:arduinoisp attiny84at16.upload.protocol=avrispv2attiny84at16.upload.using=pololuattiny84at16.upload.maximum_size=8192 Frequency 8.0- MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms; [CKSEL=1111 SUT=11]Brown-out detection level at VCC=4.3 V; [BODLEVEL=100]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Serial program downloading (SPI) enabled; [SPIEN=0]attiny84at16.bootloader.low_fuses=0xFF attiny84at16.build.mcu=attiny84 ########################################################################### attiny84at8.name=ATtiny84 @ 8 MHz (internal oscillator; BOD disabled) The following do NOT work...attiny84at8.upload.using=avrispv2attiny84at8.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny84at8.upload.using=arduino:arduinoisp attiny84at8.upload.protocol=avrispv2attiny84at8.upload.using=pololuattiny84at8.upload.maximum_size=8192 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny84at8.bootloader.low_fuses=0xE2 attiny84at8.build.mcu=attiny84 ########################################################################### attiny84at1.name=ATtiny84 @ 1 MHz (internal oscillator; BOD disabled) The following do NOT work...attiny84at1.upload.using=avrispv2attiny84at1.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny84at1.upload.using=arduino:arduinoisp attiny84at1.upload.protocol=avrispv2attiny84at1.upload.using=pololuattiny84at1.upload.maximum_size=8192 Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueDivide clock by 8 internally; [CKDIV8=0]Brown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny84at1.bootloader.low_fuses=0x62 attiny84at1.build.mcu=attiny84 ########################################################################### attiny44at8.name=ATtiny44 @ 8 MHz (internal oscillator; BOD disabled) The following do NOT work...attiny44at8.upload.using=avrispv2attiny44at8.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny44at8.upload.using=arduino:arduinoisp attiny44at8.upload.protocol=avrispv2attiny44at8.upload.using=pololuattiny44at8.upload.maximum_size=4096 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny44at8.bootloader.low_fuses=0xE2 attiny44at8.build.mcu=attiny44 attiny44at8.build.core=empty########################################################################### attiny44at1.name=ATtiny44 @ 1 MHz (internal oscillator; BOD disabled) The following do NOT work...attiny44at1.upload.using=avrispv2attiny44at1.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny44at1.upload.using=arduino:arduinoisp attiny44at1.upload.protocol=avrispv2attiny44at1.upload.using=pololuattiny44at1.upload.maximum_size=4096 Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueDivide clock by 8 internally; [CKDIV8=0]Brown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny44at1.bootloader.low_fuses=0x62 attiny44at1.build.mcu=attiny44 attiny44at1.build.core=empty########################################################################### attiny24at16.name=ATtiny24 @ 16 MHz (external crystal; BOD disabled) The following do NOT work...attiny24at16.upload.using=avrispv2attiny24at16.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny24at16.upload.using=arduino:arduinoisp attiny24at16.upload.protocol=avrispv2attiny24at16.upload.using=pololuattiny24at16.upload.maximum_size=2048 Ext. Crystal Osc.; Frequency 8.0- MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms; [CKSEL=1111 SUT=11]Brown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Serial program downloading (SPI) enabled; [SPIEN=0]attiny24at16.bootloader.low_fuses=0xFF attiny24at16.build.mcu=attiny24 ########################################################################### attiny85at16e.name=ATtiny85 @ 16 MHz (external crystal; 4.3 V BOD) The following do NOT work...attiny85at16e.upload.using=avrispv2attiny85at16e.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny85at16e.upload.using=arduino:arduinoisp attiny85at16e.upload.protocol=avrispv2attiny85at16e.upload.using=pololuattiny85at16e.upload.maximum_size=8192 Ext. Crystal Osc.; Frequency 8.0- MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms; [CKSEL=1111 SUT=11]Brown-out detection level at VCC=4.3 V; [BODLEVEL=100]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Serial program downloading (SPI) enabled; [SPIEN=0]attiny85at16e.bootloader.low_fuses=0xFF attiny85at16e.build.mcu=attiny85 ########################################################################### attiny85at16p.name=ATtiny85 @ 16 MHz (internal PLL; 4.3 V BOD) The following do NOT work...attiny85at16p.upload.using=avrispv2attiny85at16p.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny85at16p.upload.using=arduino:arduinoisp attiny85at16p.upload.protocol=avrispv2attiny85at16p.upload.using=pololuattiny85at16p.upload.maximum_size=8192 PLL Clock; Start-up time PWRDWN/RESET: 1K CK/14 CK + 4 ms; [CKSEL=0001 SUT=00]Brown-out detection level at VCC=4.3 V; [BODLEVEL=100]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Serial program downloading (SPI) enabled; [SPIEN=0]attiny85at16p.bootloader.low_fuses=0xC1 attiny85at16p.build.mcu=attiny85 ########################################################################### attiny861at1.name=ATtiny861 @ 1 MHz (internal oscillator; BOD disabled) attiny861at1.upload.using=arduino:arduinoisp attiny861at1.upload.maximum_size=8192 Default clock (slowly rising power; long delay to clock; 1 MHz internal)Int. RC Osc. 8 MHz divided by 8; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]attiny861at1.bootloader.low_fuses=0x62 attiny861at1.build.mcu=attiny861 ########################################################################### attiny861at18.name=ATtiny861 @ 18.432 MHz (external oscillator; BOD disabled) attiny861at18.upload.using=arduino:arduinoisp attiny861at18.upload.maximum_size=8192 Default clock (slowly rising power; long delay to clock; 1 MHz internal)Int. RC Osc. 8 MHz divided by 8; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]attiny861at18.bootloader.low_fuses=0xA0 attiny861at18.build.mcu=attiny861 ########################################################################### attiny85at8.name=ATtiny85 @ 8 MHz (internal oscillator; BOD disabled) The following do NOT work...attiny85at8.upload.using=avrispv2attiny85at8.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny85at8.upload.using=arduino:arduinoisp attiny85at8.upload.protocol=avrispv2attiny85at8.upload.using=pololuattiny85at8.upload.maximum_size=8192 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny85at8.bootloader.low_fuses=0xE2 attiny85at8.build.mcu=attiny85 ########################################################################### attiny85at1.name=ATtiny85 @ 1 MHz (internal oscillator; BOD disabled) The following do NOT work...attiny85at1.upload.using=avrispv2attiny85at1.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny85at1.upload.using=arduino:arduinoisp attiny85at1.upload.protocol=avrispv2attiny85at1.upload.using=pololuattiny85at1.upload.maximum_size=8192 Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueDivide clock by 8 internally; [CKDIV8=0]Brown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny85at1.bootloader.low_fuses=0x62 attiny85at1.build.mcu=attiny85 ########################################################################### attiny45at8.name=ATtiny45 @ 8 MHz The following do NOT work...attiny45at8.upload.using=avrispv2attiny45at8.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny45at8.upload.using=arduino:arduinoisp attiny45at8.upload.protocol=avrispv2attiny45at8.upload.using=pololuattiny45at8.upload.maximum_size=4096 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny45at8.bootloader.low_fuses=0xE2 attiny45at8.build.mcu=attiny45 ########################################################################### attiny45at1.name=ATtiny45 @ 1 MHz The following do NOT work...attiny45at1.upload.using=avrispv2attiny45at1.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny45at1.upload.using=arduino:arduinoisp attiny45at1.upload.protocol=avrispv2attiny45at1.upload.using=pololuattiny45at1.upload.maximum_size=4096 Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueDivide clock by 8 internally; [CKDIV8=0]Brown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny45at1.bootloader.low_fuses=0x62 attiny45at1.build.mcu=attiny45 ########################################################################### attiny85at128.name=ATtiny85 @ 128 KHz (watchdog oscillator; 1.8 V BOD) The following do NOT work...attiny85at128.upload.using=avrispv2attiny85at128.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny85at128.upload.using=arduino:arduinoisp attiny85at128.upload.protocol=avrispv2attiny85at128.upload.using=pololuattiny85at128.upload.maximum_size=8192 WD. Osc. 128 kHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 0 ms; [CKSEL=0100 SUT=00]Brown-out detection level at VCC=1.8 V; [BODLEVEL=110]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Serial program downloading (SPI) enabled; [SPIEN=0]attiny85at128.bootloader.low_fuses=0xC4 attiny85at128.build.mcu=attiny85 ########################################################################### attiny25at8.name=ATtiny25 @ 8 MHz The following do NOT work...attiny25at8.upload.using=avrispv2attiny25at8.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny25at8.upload.using=arduino:arduinoisp attiny25at8.upload.protocol=avrispv2attiny25at8.upload.using=pololuattiny25at8.upload.maximum_size=2048 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny25at8.bootloader.low_fuses=0xE2 attiny25at8.build.mcu=attiny25 ########################################################################### attiny25at1.name=ATtiny25 @ 1 MHz The following do NOT work...attiny25at1.upload.using=avrispv2attiny25at1.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny25at1.upload.using=arduino:arduinoisp attiny25at1.upload.protocol=avrispv2attiny25at1.upload.using=pololuattiny25at1.upload.maximum_size=2048 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny25at1.bootloader.low_fuses=0x62 attiny25at1.build.mcu=attiny25 ########################################################################### attiny2313at8.name=ATtiny2313 @ 8 MHz The following do NOT work...attiny2313at8.upload.using=avrispv2attiny2313at8.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny2313at8.upload.using=arduino:arduinoisp attiny2313at8.upload.protocol=avrispv2attiny2313at8.upload.using=pololuattiny2313at8.upload.maximum_size=2048 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time: 14 CK + 65 ms; [CKSEL=0100 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Serial program downloading (SPI) enabled; [SPIEN=0]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny2313at8.bootloader.low_fuses=0xE4 attiny2313at8.build.mcu=attiny2313 ########################################################################### attiny2313at1.name=ATtiny2313 @ 1 MHz The following do NOT work...attiny2313at1.upload.using=avrispv2attiny2313at1.upload.using=Pololu USB AVR ProgrammerThe following DO work (pick one)...attiny2313at1.upload.using=arduino:arduinoisp attiny2313at1.upload.protocol=avrispv2attiny2313at1.upload.using=pololuattiny2313at1.upload.maximum_size=2048 Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)Int. RC Osc. 8 MHz; Start-up time: 14 CK + 65 ms; [CKSEL=0100 SUT=10]; default valueDivide clock by 8 internally; [CKDIV8=0]Brown-out detection disabled; [BODLEVEL=111]Serial program downloading (SPI) enabled; [SPIEN=0]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]attiny2313at1.bootloader.low_fuses=0x64 attiny2313at1.build.mcu=attiny2313 ########################################################################### attiny167.name=ATtiny167 @ 8 MHz (internal oscillator; BOD enabled) attiny167.upload.using=arduino:arduinoisp attiny167.upload.maximum_size=16384 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Self-Programming Disabled; [SELFPRGEN=1]attiny167.bootloader.low_fuses=0xE2 attiny167.build.mcu=attiny167 ########################################################################### attiny87.name=ATtiny87 @ 8 MHz (internal oscillator; BOD enabled) attiny87.upload.using=arduino:arduinoisp attiny87.upload.maximum_size=8192 Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Self-Programming Disabled; [SELFPRGEN=1]attiny87.bootloader.low_fuses=0xE2 attiny87.build.mcu=attiny87 ########################################################################### attiny167_20.name=Optiboot ATtiny167 @ 20 MHz (external oscillator; BOD enabled) attiny167_20.upload.protocol=arduino Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default valueBrown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Self-Programming Enabled; [SELFPRGEN=0]attiny167_20.bootloader.low_fuses=0xA0 attiny167_20.build.mcu=attiny167 ########################################################################### attiny84_12.name=Optiboot ATtiny84 @ 12 MHz (external osc) attiny84_12.upload.protocol=arduino attiny84_12.bootloader.low_fuses=0xE0 attiny84_12.build.mcu=attiny84 ########################################################################### attiny84_12_no.name=Optiboot ATtiny84 @ 12 MHz (external osc - NO MILLIS!) attiny84_12_no.upload.protocol=arduino attiny84_12_no.bootloader.low_fuses=0xE0 attiny84_12_no.build.mcu=attiny84 attiny84.upload.protocol=arduino attiny84.bootloader.low_fuses=0xE2 attiny84.build.mcu=attiny84 ########################################################################### attiny84nr.name=Optiboot ATtiny84 @ 8 MHz (NO RESET!) attiny84nr.upload.protocol=arduino attiny84nr.bootloader.low_fuses=0xE2 attiny84nr.build.mcu=attiny84 ########################################################################### attiny85.name=Optiboot ATtiny85 @ 8 MHz (internal osc) attiny85.upload.protocol=arduino attiny85.bootloader.low_fuses=0xE2 attiny85.build.mcu=attiny85 ########################################################################### attiny88.name=ATtiny88 @ 1 MHz (internal oscillator; BOD enabled) Default clock (slowly rising power; long delay to clock; 8 MHz internal)Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 65 ms; [CKSEL=1110 SUT=10]; default valueDivide clock by 8 internally; [CKDIV8=0]attiny88.bootloader.low_fuses=0x6E Brown-out detection disabled; [BODLEVEL=111]Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]Serial program downloading (SPI) enabled; [SPIEN=0]attiny88.bootloader.high_fuses=0xD7 Self-Programming Disabled; [SELFPRGEN=1]attiny88.bootloader.extended_fuses=0x06 attiny88.bootloader.path= ########################################################################### |
If you fork the repository, you can commit changes to your own fork, and then they can be merged back into this one. |
Thanks, new to the whole github thing. I've forked to tomscatliff/ATTinyCore, and committed the changes. On Tue, Aug 12, 2014 at 9:14 AM, Tom Carpenter notifications@github.com
|
moved to issue #25 |
Hi tomscatliff/TCWORLD, What still needs to be done to be able to use this core for the attiny88? |
@tomscatliff: Have you had a chance to test real hardware? I see the commented pin mapping is for the 28 pin PDIP and QFN packages, which has 12 (or 18?) digital pins and 6 analog inputs. But lines 35-36 define 16 pins and 11 pins, respectively (https://github.com/TCWORLD/ATTinyCore/blob/master/tiny/variants/tinyX8/pins_arduino.h). This is the first time I've looked at a pins_arduino.h file, so I may be missing something. The TQFP-32 pin package and QFN-32 pin packages of ATtiny48/88 contain four additional pins under Port A: -PA0 @TCWORLD: Can you please advise how to implement Port A? I assume this will do it, but am unsure whether the order of the array contents is critical, and whether the core support PA. I have a PCB with a 32-pin ATTiny44/88 on the way and can provide hardware feedback soon. const uint16_t PROGMEM port_to_mode_PGM[] = { const uint16_t PROGMEM port_to_output_PGM[] = { const uint16_t PROGMEM port_to_input_PGM[] = { const uint8_t PROGMEM digital_pin_to_port_PGM[] = { const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { }; |
For Port A, you would need them to take this format:
The same layout for the output and input registers. |
I have just had a look through the pins_arduino.h file and you are correct there are several mistakes in it including the defines for number of pins. |
Thank you! I'll share results as soon as my ATtiny88 boards arrive. |
I think another four pins are missing: PB6 / PCINT6 |
B6 and B7 are the oscillator pins. C6 is the reset pin. On the Uno these don't have assigned digital pins. If you want to assign them digital pin numbers, just assign them at the end of the list of digital pins. |
You're right, it doesn't have XTAL pins. I was just assuming it would be the same as the mega328. |
Changed the pin mapping of the preliminary ATTiny88 support to include missing pins.
I got it as far as compiling, but then had to abandon further development. On Wed, Nov 26, 2014 at 5:20 PM, Tom Carpenter notifications@github.com
|
TC, while you're at it, in light of this t88 pins_arduino.h issue, I've noticed strangeness with the t87/167 too, mainly with which pins have / can-have PWM, wondering if you can take a look? I'm not au fait enough with how Arduino can make use of the available hardware-pwm-capable pins (for example the t87/167 has 9 OC-capable pins, 1 for Timer0 on PA2, & 8 for Timer1 on all of PBx), but less than half of those have been defined in pins_arduino.h, & they don't even line up: t87/167's pins_arduino.h says Arduino Pins 2, 3, 4, & 5 are PWM. yet AFAIK that corresponds to: Arduino-Pin2 = PB6 (OC1AX), yet when I "analogWrite(2, 0x7f)" I don't get PWM output; These 2/3/4/5 Arduino-Pin # also contradict the chip-diagram with the * denoting which ones are PWM. This SEEMS to my untrained eye to be all to do with the 'digital_pin_to_timer_PGM' array only having 2 entries, and it seems to be in some 'random' order I can't work out: const uint8_t PROGMEM digital_pin_to_timer_PGM[] = And I don't understand what appears to be two different references to Timers in Arduinoland: in t87/167 there's just the 2, Timer0 & Timer1, other ATmegas have Timer2 & even Timer3 too I think, but most Arduino-standard pins_arduino.h files (for larger pin-count AVRs & where Arduino have defined PWM support on more than just a few pins, e.g. Uno, & particularly Mega) they seem to reference TIMER1A, TIMER1B, TIMER2A, TIMER2B, TIMER3A, TIMER3B, TIMER4A, TIMER4B, etc - that is, well above the actual number of hardware timers. Can you point me to where else in Arduino source files this is abstracted? If I can wrap my head around this (if you can point me to where there might be some doco?), I'd be happy to make a corrected pins_arduino.h, because I've made some other mods to the t87/167 support too, for supporting the 2.56V analog reference, instead of just the 1.1V ref, which I'd like to PR back into this project. |
The tX7 variants are a bit tricky. Basically while yes there are 8 pins on Timer1 capable of PWM, there are only two PWM generators - using TCCR1D you can select which pins are enabled. You could have all 8 enabled, but each of the two groups of 4 would have the same PWM out (not individually controlled). I picked two to use. I think I also added something into the init() function for the X7 to set the correct bits of TCCR1D, but I can't remember - I may not have done, it may be something you have to add at the start of your sketch. |
riiiight, this is starting to make sense now. i can't believe I missed that most basic limitation on page1 of the datasheet facepalm. |
Programming the ATTiny88 via ISP was successful on the first try. Pin mapping seems to be perfect! I've tested pins PD3, PA3, PB6, PB7, PD5, PB1, PC7, and PD2. Since at least one pin of each port is correct, I think it's safe to assume all digital pins are correctly implemented. Analog inputs will be tested tomorrow (more soldering to do on my part first...). Here's the full pin mapping (hopefully saves time for others): // ATTINY88 PINOUT |
Analog inputs seem to be broken. Each pin value is about 355, regardless of input. Only A0-A5 are implemented, but functionality is more pressing... Is there a trick to initializing the ADC? I set line 42 in pins_arduino.h to 1: The tinyX7/pins_arduino.h contains additional code. Perhaps this is missing? //Please define the port on which the analog comparator is found. |
You will need to define the references in the header, they were missed. If you look in the datasheet for the ADC it describes what value corresponds to what reference source. The analog comparator additions can be added as well, but they are for if software serial is enabled as that is used as an interrupt source for serial comms. It has no bearing on the ADC. You will need to compare the ADC registers between the tinyX8 and say tinyX4 data sheets and see if the register names/functions are similar. If they are then the existing code for the ADC should work. If they are very different then core code will have to be modified. (p.s. I'd use the tinyX4 header as a reference and the X7's are a bit funky). |
No success with: Perhaps this is caused by register bit 7 only accepting a read condition for ATTiny88, whereas ATTiny84 accepts read/write. Core problem? |
Pin mapping changed slightly. Added empty bootloader files. Updated boards.txt to include millis. Fixed wiring.c to work with ATiiny88 timer 0 peculiarities. Fixed the wiring_analog.c code to work with ATiiny88 ADC.
Try the ADC now. |
Updated comments in file to match changes made in commit #c9bbf7c
Okay, I updated the test sketch. Digital pin functionality remains okay (although PC7 was axed). When applying a 2.5VDC input to ADC1: *tiny core returns constant ADC readings of 0 |
Double check the mappings as I had to make some changes. |
Mappings are up to date. The sketch is as simple as possible. I'm manipulating the "SupplyVoltage > 1" condition to light a red or white LED. // Testing ATTiny88 ADC // TEMPORARY VARIABLES void setup() digitalWrite(WhiteLED, HIGH); void loop() |
I was just meaning with regards to PC7, that is now digital pin 16. Could you try Serial out for me. Just do Serial.begin(9600); and Serial.println("Hello"); See if you get any output in the serial monitor. The pin mappings (relative to the Attiny) are TX = PD6 (Digital 6) and RX = PD7 (Digital 7). |
I think I fixed it. Line 67 in the pins_arduino.h should be: See posts above. DEFAULT(0) sets a 1.1V reference. DEFAULT(1) sets AVcc reference for ATTiny X8, which is opposite of the ATTinyX4. 'tiny' core now works, tested with ADC1 and ADC2. The ATTiny88 lacks TX and RX pins, so no serial :-( I'm uploading code via ISP. PC7: Noted. I'll update my production code and test other pins. |
Will correct that. The ATTinyCore has build in software serial routines using the Analog Comparator as an interrupt source. You should be able to use Serial on the two pins I mentioned. |
Oh right, I'll give that a try. |
Latest commit 7d71ca2 should make analogRead() with no-millis core work. The ADC was not being initialised in that core - so in fact analogRead() in the no millis core won't have worked with any device. |
tinyNoMillis is confirmed working with analogRead(), and PC7 tests okay. Serial: Will report back as soon as I can. Something went wrong with my soldering, and I just about blew the USB bus. |
Name of the empty bootloader file for ATTiiny88 was wrong. This is fixed.
Added entries and modification for ATTiny88 into the UECIDE core.
Excellent. I'm going to mark this issue closed for the time being, but if there are any more issues with the Attiny88 that anyone finds, feel free to open this again. |
I'm happy to take a shot at the pins_arduino.h file for the ATTiny88 and test on it.
Can you describe the test procedure? How do I build an empty/tiny core for the device? gcc-avr? Also, is the empty core sufficient for deploying code (ie. a blink sketch or similar) to the 88?
The text was updated successfully, but these errors were encountered: