77 of 208
ZBasic Language Reference 69 ZX Microcontroller Family CPU Registers for mega1280-based ZX Models ACSR EEARH MCUSR OCR4BL PINJ SPMCSR TCNT2 TWCR ADCH EEARL MONDR OCR4CH PINK SPSR TCNT3H TWDR ADCL EECR OCDR OCR4CL PINL SREG TCNT3L TWSR ADCSRA EEDR OCR0A OCR5AH PORTA TCCR0A TCNT4H UBRR0H ADCSRB EICRA OCR0B OCR5AL PORTB TCCR0B TCNT4L UBRR0L ADMUX EICRB OCR1AH OCR5BH PORTC TCCR1A TCNT5H UBRR1H ASSR EIFR OCR1AL OCR5BL PORTD TCCR1B TCNT5L UBRR1L CLKPR EIMSK OCR1BH OCR5CH PORTE TCCR1C TIFR0 UCSR0A DDRA EIND OCR1BL OCR5CL PORTF TCCR2A TIFR1 UCSR0B DDRB GPIOR0 OCR1CH OSCCAL PORTG TCCR2B TIFR2 UCSR0C DDRC GPIOR1 OCR1CL PCICR PORTH TCCR3A TIFR3 UCSR1A DDRD GPIOR2 OCR2A PCIFR PORTJ TCCR3B TIFR4 UCSR1B DDRE GTCCR OCR2B PCMSK0 PORTK TCCR3C TIFR5 UCSR1C DDRF ICR1H OCR3AH PCMSK1 PORTL TCCR4A TIMSK0 UDR0 DDRG ICR1L OCR3AL PINA PRR0 TCCR4B TIMSK1 UDR1 DDRH ICR3H OCR3BH PINB PRR1 TCCR4C TIMSK2 WDTCSR DDRJ ICR3L OCR3BL PINC RAMPZ TCCR5A TIMSK3 XMCRA DDRK ICR4H OCR3CH PIND SMCR TCCR5B TIMSK4 XMCRB DDRL ICR4L OCR3CL PINE SPCR TCCR5C TIMSK5 DIDR0 ICR5H OCR4AH PINF SPDR TCNT0 TWAMR DIDR1 ICR5L OCR4AL PING SPH TCNT1H TWAR DIDR2 MCUCR OCR4BH PINH SPL TCNT1L TWBR The 16-bit registers for the mega1280-based ZX models are shown in the table below. ADC ICR5 OCR3B OCR5A TCNT3 EEAR OCR1A OCR3C OCR5B TCNT4 ICR1 OCR1B OCR4A OCR5C TCNT5 ICR3 OCR1C OCR4B SP UBRR0 ICR4 OCR3A OCR4C TCNT1 UBRR1 ZX-24x, ZX-32a4 and ZX-128a1 Registers The registers for the ATxmega-based devices are not listed here due to the very large number of registers present. The Atmel ATxmega documentation should be consulted when register names are needed. 3.8.2 Control Program Variables Some of the ZBasic register values allow access to certain variables used by the system control program as described below. Unless otherwise indicated, the registers are readable and writable. However, for some of the variables, modifying their values may have undesirable or unpredictable effects on your program. See the descriptions of the individual items for more information. BasicX Compatibility Note In BasicX mode, only a subset of the variables described below is available, being limited to those that are also present in BasicX. Those that are available in BasicX mode are specifically identified in their descriptions. Register.BootVersion This UnsignedInteger value gives the version number of the bootloader installed on the ZX device. The high byte gives the major value while the low byte gives the minor value. For example, if the bootloader version number is v1.4, the value of Register.BootVersion will be &H0104.