jl16regs

jl16regs - This file lists the names defined in CodeWarrior...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
This file lists the names defined in CodeWarrior C (version 6.3) for the registers in the MC68HC908JL16. This information is taken from the file "mc68hc908jl16.h" which is in the "C:\Program Files\Freescale\CodeWarrior for Microcontroller V6.3\lib\hc08c\device\include" folder. NOTE: Not all names apply to all versions of the JL16 since some pins are not available on all packages. ------------------------------- These names can be used in assignment statements to read and write the contents of the registers. PTA = 0x25; x = DDRA; Some of the timer registers are the upper and lower parts of a 16-bit register. The combined 16-bit register can be accessed with a single statement. T1MOD = 0x2345; This is equivalent to T1MODH = 0x23; T1MODL = 0x45; The individual bits in the registers can also be read and written by using the names defined below for the bits. PTB_PTB7 = 1; if (PTA_PTA2) { . ... } Some registers have groups of two or more bits that are parts of a single quantity. These can be accessed with a single statement. T1SC_PS = 5; This is equivalent to T1SC_PS2 = 1; T1SC_PS1 = 0; T1SC_PS0 = 1; Note that assignments to register locations that write less than the full eight bits will generate code that first reads the register, modifies the bits as needed, and then writes all eight bits back. ------------------------------- Port A Data Register (0x0000) PTA PTA_PTA7 bit 7 - Port A Data Bit 7 PTA_PTA6 bit 6 - Port A Data Bit 6 PTA_PTA5 bit 5 - Port A Data Bit 5 PTA_PTA4 bit 4 - Port A Data Bit 4 PTA_PTA3 bit 3 - Port A Data Bit 3 PTA_PTA2 bit 2 - Port A Data Bit 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
PTA_PTA1 bit 1 - Port A Data Bit 1 PTA_PTA0 bit 0 - Port A Data Bit 0 Port B Data Register (0x0001) PTB PTB_PTB7 bit 7 - Port B Data Bit 7 PTB_PTB6 bit 6 - Port B Data Bit 6 PTB_PTB5 bit 5 - Port B Data Bit 5 PTB_PTB4 bit 4 - Port B Data Bit 4 PTB_PTB3 bit 3 - Port B Data Bit 3 PTB_PTB2 bit 2 - Port B Data Bit 2 PTB_PTB1 bit 1 - Port B Data Bit 1 PTB_PTB0 bit 0 - Port B Data Bit 0 Port D Data Register (0x0003) PTD PTD_PTD7 bit 7 - Port D Data Bit 7 PTD_PTD6 bit 6 - Port D Data Bit 6 PTD_PTD5 bit 5 - Port D Data Bit 5 PTD_PTD4 bit 4 - Port D Data Bit 4 PTD_PTD3 bit 3 - Port D Data Bit 3 PTD_PTD2 bit 2 - Port D Data Bit 2 PTD_PTD1 bit 1 - Port D Data Bit 1 PTD_PTD0 bit 0 - Port D Data Bit 0 Data Direction Register A (0x0004) DDRA DDRA_DDRA7 bit 7 - Data Direction Register A Bit 7 DDRA_DDRA6 bit 6 - Data Direction Register A Bit 6 DDRA_DDRA5 bit 5 - Data Direction Register A Bit 5 DDRA_DDRA4 bit 4 - Data Direction Register A Bit 4 DDRA_DDRA3 bit 3 - Data Direction Register A Bit 3 DDRA_DDRA2 bit 2 - Data Direction Register A Bit 2 DDRA_DDRA1 bit 1 - Data Direction Register A Bit 1 DDRA_DDRA0 bit 0 - Data Direction Register A Bit 0 Data Direction Register B (0x0005) DDRB DDRB_DDRB7 bit 7 - Data Direction Register B Bit 7 DDRB_DDRB6 bit 6 - Data Direction Register B Bit 6 DDRB_DDRB5 bit 5 - Data Direction Register B Bit 5 DDRB_DDRB4 bit 4 - Data Direction Register B Bit 4 DDRB_DDRB3 bit 3 - Data Direction Register B Bit 3
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/08/2011 for the course EE 459L taught by Professor Weber during the Spring '11 term at USC.

Page1 / 9

jl16regs - This file lists the names defined in CodeWarrior...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online