AN2504 Freescale Semiconductor / Motorola, AN2504 Datasheet - Page 15

no-image

AN2504

Manufacturer Part Number
AN2504
Description
On-Chip FLASH Programming API for CodeWarrior Software
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
MOTOROLA
On-Chip FLASH Programming API for CodeWarrior Software
/*
interrupt 6 void Timer(void) {
}
interrupt 2 void SWI(void) {
}
*/
/********************************************************************
void main(void) {
/* System configuration */
/*
/*
*/
********************************************************************/
TASC=TASC;
Freescale Semiconductor, Inc.
TASC &= TOF;
__asm swi;
DisableInterrupts;
while (-1) {
}
MAIN
Byte temp;
Byte size;
Word address;
CONFIG2 = 0x80;
CONFIG1 = 0x11;
Configure the timer if wanted */
TMODH = 0x4C;
TMODL = 0xCD;
TSC
temp = TABLE1[0];
size = TABLE2[0];
For More Information On This Product,
TransmitByte ('X');
= 0x40;
Go to: www.freescale.com
/* 10000000b;
/* 00010001b;
// Interrupt every 16 ms
// 01000000b;
// ||||||||_________ Timer Prescaled by 1
// |||||
// |||||
// |||||
// |||||____________ Unimplemented
// ||||_____________ Reset Bit = 0 -> No effect
// |||______________ Stop Bit: Start Counter
// ||_______________ TIM Overflow ints enabled
// |________________ TIM Overflow Flag
||||||||_________ Reserved
|||||____________ LVIT
||| _____________ Reserved
|________________ IRQ Internal Pull-Up
||||||||_________ COP disabled
|||||||__________ STOP as illegal opcode
||||||___________ Short Stop Recovery Bit
|||||____________ Reserved
||||_____________ LVI enabled
|||______________ Reserved
|________________ COP reset period
// If a timer interrupt happens
// call the Software Interrupt
// Software Interrupt ISR
// may include user-supplied code.
// The stack can be reset and
// the whole program started again.
Int Bus Clk = 1.2288MHz
1229 counts,
error = 0.58 sec/hour
Typical API Calls
AN2504/D
*/
*/
15

Related parts for AN2504