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

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.3 Two pulse widths measurement by free-running counter
/******************************************************************************/
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/******************************************************************************/
#pragma sfr
#pragma EI
#pragma DI
#pragma interrupt INTTM000 intervalint rb2
#pragma interrupt INTTM010 intervalint2 rb2
void main(void)
{
}
unsigned int data[6];
unsigned int length,length2;
PCC = 0x0;
data[0] = 0;
data[1] = 0;
data[2] = 0;
data[3] = 0;
data[4] = 0;
data[5] = 0;
PM7.0 = 1;
PM7.1 = 1;
TMMK010 = 0;
TMMK000 = 0;
PRM00 = 0b11110010;
CRC00 = 0b00000101;
TMC00 = 0b00000100;
EI();
while(1){
}
Two-pulse-width measurement sample by free-running
Measurement results to be up to 16 bits and not checked for errors
data[0]: End flag
data[1]: Measurement results (pulse width)
data[2]: Previous read value
data[3]: End flag
data[4]: Measurement results (pulse width)
data[5]: Previous read value
Result area at TI000 side
Result area at TI010 side
Timer 00 operation sample
if(data[0] != 0)
{
}
if(data[3] != 0)
{
}
CHAPTER 8 16-BIT TIMER/EVENT COUNTERS 00, 01
TMMK010 = 1;
length = data[1];
data[0] = 0;
TMMK010 = 0;
TMMK000 = 1;
length2 = data[4];
data[3] = 0;
TMMK000 = 0;
User’s Manual U14260EJ4V0UD
/* Data area */
/* Set high-speed operation mode */
/* Clear data area */
/* Set port */
/* Set P70 as input */
/* Set P71 as input */
/* Set interrupt */
/* Cancel INTTM010 interrupt mask */
/* Cancel INTTM000 interrupt mask */
/* Set timer 00 */
/* Both rising and falling edges */
/* Count clock is fx/2^6
/* Set CR000 and CR010 to capture register */
/* Start in free-run mode */
/* Dummy loop */
/* TI000 measurement completion check */
/* TI010 measurement completion check */
/* INTTM010 interrupt disabled for
/* Read measurement results */
/* Clear end flag */
/* Exclusive operation completed */
/* INTTM000 interrupt disabled for
/* Read measurement results */
/* Clear end flag */
/* Exclusive operation completed */
exclusive operation */
exclusive operation */
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
179

Related parts for UPD78F0078GK-9ET-A