71 of 172
ZBasic Language Reference 64 ZX Microcontroller Family The 16-bit registers for the mega1281-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-1280 and ZX-1280n Registers The pre-defined CPU registers for the ZX-1280 and ZX-1280n match those available on the ATmega1280 CPU and all are Byte values. Discussion of the use of these registers is beyond the scope of this document. See the Atmel documentation for a full description. Also, be advised that modifying some of these registers may severely alter the behavior of the control program, possibly even rendering it inoperable. 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 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.