Part Number Hot Search : 
ST711080 DS1817 AX931 PST1600B 98R7157 TDA7295 5KP110A 527184XM
Product Description
Full Text Search
 

To Download M16C26A-24NT Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? rej05b0810_0110 rev.1.10 2007.11 page 1 of 16 application notes m16c/26a group sample program (24-number time-of-day clock) 1. summary this sample program provides the functionality of a 24-number tim e-of-day clock by using the re nesas starter kit for m16c/26a (r0k33026as000be). 2. introduction the example described here applies to the microcomputers listed below. microcomputer: m16c/26a this sample program runs on the renesas starter kit for m16c/26a (r0k33026as000be). prepare an extension board available for the renesas starter kit or create a circuit similar to the one shown in the example ci rcuit on page ?? and then connect it to the starter kit. this program uses rsk_lib. for details about rsk_lib, see the rs k_lib reference manual. (rsk_lib is the library software provid ed for use with the renesas starter kit for m16c/26a.) 24-number time-of-day clock
? rej05b0810_0110 rev.1.10 2007.11 page 2 of 16 m16c/26a group sample program (24-number time-of-day clock) 3. port arrangement - - - - : cl o c k sw1 sw3 sw2 10mhz 32.768khz lcd p83 p84 p15 xin xcin p60 p61 p62 p63 p90 p91 lcd e lcd r lcd d7 lcd d6 lcd d5 lcd d4 m30260f8agp
? rej05b0810_0110 rev.1.10 2007.11 page 3 of 16 m16c/26a group sample program (24-number time-of-day clock) 4. operational outline a 24-number digital time-of-day clock is displayed on liquid crystal display. press sw3 to go to hours/minutes setup mode, adjust ?hours? in the range from 00 o?cloc k to 23 o?clock using sw1 and sw2, and t hen press sw3 to fix the ?hours.? go on and adju st ?minutes? in the range from 00 minutes to 59 minutes using sw1 and sw2, and then press sw3 to fix the ?minutes,? letting the time-of-day clock start counting. after that, operation mode is transitioned from wait mode to low power consumpt ion mode every 1 minute, thereby updating the di splay of the time-of-day clock. *timer a0 (timer mode, main 2 ms cycle) this timer counts 2 milliseconds using the main clock of the microcomputer as the count source. it is used as the basic timer of rsk_lib. time management and lcd display manage ment are performed using this timer. m16c26a liquid crystal display sw2 sw1/ boot 1 minute elapsed sw3 sw3 depressed wait mode low power consumption mode liquid crystal display wait mode low power consumption mode 1 minute elapsed m16c26a sw2 sw1/ boot sw3
? rej05b0810_0110 rev.1.10 2007.11 page 4 of 16 m16c/26a group sample program (24-number time-of-day clock) 5. operational specification (1) immediately after the reset switch is depressed, the lcd shows ?--:--.? (2) pressing the clock setting switch (sw3) places the program into clock setup mode. ? in ?hours? setup mode, the ?hours? display flashes at 1 khz. (during up/down manipul ation, the display flashes every 500 ms by repeatedly turning on and off.) (3) use the up switch (sw1) to increment the digit by 1 or the down switch (sw2) to decrement by 1 to adjust the ?hours.? [operational specification of the up and down switches] when a maximum value is reached, a minimum value returns. when a minimum value is reached, a maximum value returns. if either switch is held down for 1 second or more, the numeral continuously goes up or down every 100 ms. (4) pressing the clock-setting switch (sw3) fixes the ?hours.? the program goes to ?m inutes? setup mode. ? in ?minutes? setup mode, the ?minutes? display flashes at 1 khz. (during up/down manipul ation, the display flashes every 500 ms by repeatedly turning on and off.) (5) use the up switch (sw1) to increment the digit by 1 or the down switch (sw2) to decrement by 1 to adjust the ?minutes.? (6) press the clock setting switch (sw3) to fix the ?minutes.? (7) the clock display starts. ? low power consumption mode ? wait mode [low power consumption mode] main clock oscillation (10 mhz) switched to sub-clock oscillation (32.768 khz). [wait mode] the program returns from wait mode every 1 minute, thereby starting to run. (8) to reset the time-of-day clock, follow the above setup steps over again beginning with (1). (1) reset start (2) time clock setting (3) up/dn button (4) time clock setting 12 0 0 0 0 0 0 : (6)time clock setting (5)up/dn button -- -- : time clock not set yet 1 1 1 2 2 2 -- : ?hours? setting ?minutes? setting 12 00 : time of day fixed, start counting
? rej05b0810_0110 rev.1.10 2007.11 page 5 of 16 m16c/26a group sample program (24-number time-of-day clock) 6. definition of the rsk functionality and the rs k_lib apis and common functions used by the 24-number time-of-day clock 6.1 definition of the rsk functionality rskdefine.h file in this application, the following functionalities (those shown in red) are set. individual definition of e ach selected functionality /********************************************************* the boot information on cpu is defined usually, th is mode is used *********************************************************/ //#define _cpu_m16c26a_normal_mod ? t ?t??w??d /* use in low power mode can be performed. */ #define _cpu_m16c26a_32khz_mod /* use of access of a flash can be performed. */ //#define _cpu_m16c26a_dataflasf_use /******************************************************** the hardware function wh ich rsk supports is chosen /********************************************************/ //#define _use_key //#define _use_buzzer //#define _option_use_ad //#define _option_use_com_rx //#define _option_use_com_tx //#define _opti on_use_infraedrx //#define _opti on_use_infraedtx #define _option_use_sw //#define _option_use_led //#define _option_use_io #if defined _option_use_sw #define _option_use_pushsw1 #define _option_use_pushsw2 #define _option_use_pushsw3 #endif all of sw1?sw3 are enabled. operation in low power mode executable push keys enabled
? rej05b0810_0110 rev.1.10 2007.11 page 6 of 16 m16c/26a group sample program (24-number time-of-day clock) 6.2 apis and common functions used apistatustype rl_settimerreq( unsigned int timervalue, char timermode, int *timerno, int *ercode ); apistatustype rl_starttimer( int timerno, int *ercode ); apistatustype rl_checktimer( int timerno, int *ercode ); apistatustype rl_getswport( char portno, char *indata, int *ercode ); apistatustype rl_putc_lcd( char ylocation, char outc, int *ercode ); apistatustype rl_putc_lcdloc( char xlocation, char ylocation, char rvtime, const char outc, int *ercode ); apistatustype rl_puts_lcdloc( char xlocation, char ylocation, char rvtime, const char far* outc, int *ercode ); void rl_errorhook( int funcno, int errorno ); for details about the apis and common func tions used by the sample program (24-num ber time-of-day clock), see the renesas starter kit library v.1.00 reference manual.
? rej05b0810_0110 rev.1.10 2007.11 page 7 of 16 m16c/26a group sample program (24-number time-of-day clock) 7. flowchart 24-number time-of-da y cloc k clear display on lcd show the initial screen show hours process clock process clock display process low power mode input push keys adjust hours low power mode entered no yes
? rej05b0810_0110 rev.1.10 2007.11 page 8 of 16 m16c/26a group sample program (24-number time-of-day clock) 8. tutorial 1 launch the hew by double-clicking its icon. 2 change the session name from ?default session? to ?sessionm16c_e8_system.?
? rej05b0810_0110 rev.1.10 2007.11 page 9 of 16 m16c/26a group sample program (24-number time-of-day clock) 3 select ?m30260f8a? for device. select ?download emulat or firmware? for mode.
? rej05b0810_0110 rev.1.10 2007.11 page 10 of 16 m16c/26a group sample program (24-number time-of-day clock) check the box labeled ?power supply is carried out. (max 300ma)? and then select ?5.0v.?
? rej05b0810_0110 rev.1.10 2007.11 page 11 of 16 m16c/26a group sample program (24-number time-of-day clock) 4 in the program and the work ram text boxes of firmware location address, enter ?f a0? and ?0b8? respectively. leave the box labeled ?debug a progr am using the wdt? unchecked.
? rej05b0810_0110 rev.1.10 2007.11 page 12 of 16 m16c/26a group sample program (24-number time-of-day clock) 5 choose dow nload from the debug tab and download a module. the upper-side choices for download show the location from which a pr oject was downloaded.
? rej05b0810_0110 rev.1.10 2007.11 page 13 of 16 m16c/26a group sample program (24-number time-of-day clock) 6 click ?start after reset? to start program execution. 7 please do "cancellation" when "t he file is opened" window opens.
? rej05b0810_0110 rev.1.10 2007.11 page 14 of 16 m16c/26a group sample program (24-number time-of-day clock) 9. web sitet renesas technology web site http://www.renesas.com/
? rej05b0810_0110 rev.1.10 2007.11 page 15 of 16 m16c/26a group sample program (24-number time-of-day clock) revision history content of revision rev. date of issue page points 1.00 2006.06.30 - first revision issued 1.10 2007.07.12 - contents of presentation improved 1.20 2007.11.29 - rsk_lib apis supported
? rej05b0810_0110 rev.1.10 2007.11 page 16 of 16 m16c/26a group sample program (24-number time-of-day clock)


▲Up To Search▲   

 
Price & Availability of M16C26A-24NT

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X