UPD78F0078GK-9ET-A Renesas Electronics America, UPD78F0078GK-9ET-A Datasheet - Page 179

no-image

UPD78F0078GK-9ET-A

Manufacturer Part Number
UPD78F0078GK-9ET-A
Description
Manufacturer
Renesas Electronics America
Datasheet

Specifications of UPD78F0078GK-9ET-A

Lead Free Status / Rohs Status
Supplier Unconfirmed

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
UPD78F0078GK-9ET-A
Quantity:
57
8.5.1 Interval timer
/*******************************************************************************/
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*******************************************************************************/
#pragma sfr
#pragma EI
#pragma DI
#define intervalTM00 130
#pragma interrupt INTTM000 intervalint rb2
void main(void)
{
}
/* Timer 00 interrupt function */
void intervalint()
{
/***************************************************/
/*
/* Define variables required for interrupt here
/*
/***************************************************/
/***********************************************************/
/*
/* Describe processing required for interrupt below
/*
/***********************************************************/
}
unsigned int ppgdata;
PCC = 0x0;
ppgdata = 0;
P7 = 0b11111110;
PM7.0 = 0;
TMMK000 = 0;
PRM00 = 0b00000010;
CRC00 = 0b00000000;
CR000 = intervalTM00;
TOC00 = 0b00000111;
TMC00 = 0b00001100;
EI();
while(1);
unsigned int work;
work = ppgdata;
if (work != 0)
{
}
Cycle set to 130 as intervalTM00 (at 8.38 MHz for 1 ms)
Variable ppgdata prepared as rewrite data area
ppgdata to be checked at every INTTM000, and changed if required.
Therefore, if change is required, set the change data in ppgdata.
When changed, ppgdata cleared to 0000.
: Cycle (if 0000, no change)
Setting example of timer 00 interval timer mode
CR000 = work;
ppgdata = 0;
if (work == 0xffff)
{
}
CHAPTER 8 16-BIT TIMER/EVENT COUNTERS 00, 01
TMC00 = 0b00000000;
User’s Manual U14260EJ4V0UD
/* Cycle data to be set to CR000 */
/* Data area to be set to timer 00 */
/* Set high-speed operation mode */
/* Set port */
/* Set the following to output */
/* Clear P70 */
/* Set P70 as output */
/* Set interrupt */
/* Cancel INTTM000 interrupt mask */
/* Set timer 00 */
/* Count clock is fx/2^6 */
/* Set CR000 and CR010 to compare register */
/* Set cycle initial value to CR000 */
/* Invert on match with CR000, initial value L */
/* Clear & start on match between TM00 and CR000 */
/* Loop as dummy here */
/* Stop timer */
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
177

Related parts for UPD78F0078GK-9ET-A