0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
B3FS-1000P

B3FS-1000P

  • 厂商:

    RENESAS(瑞萨)

  • 封装:

  • 描述:

    B3FS-1000P - Sample Program (Remote Control Transmission/Reception) - Renesas Technology Corp

  • 数据手册
  • 价格&库存
B3FS-1000P 数据手册
Application Notes M16C/26A Group Sample Program (Remote Control Transmission/Reception) 1. Summary This sample program performs remote control transmission/reception by using the Renesas Starter Kit for M16C/26A (R0K33026AS000BE). Receiver Received data Transmitter Transmitted data The extension board used here is a product from PI System Co., Ltd. 2. Introduction Microcomputers: M16C26A The example described in this document applies to the microcomputers listed below: 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 circuit diagram on page 15 and then connect it to the Starter Kit. This program uses RSK_LIB. For details about RSK_LIB, see the RSK_LIB reference manual. (RSK_LIB is the library software provided for use with the Renesas Starter Kit for M16C/26A.) REJ05B0814-0110 Rev.1.10 2007.12 Page 1 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 3. Port Arrangement The key matrix, infrared-ray transmitter/receiver and the buzzer are the facilities mounted on an extension board for the Renesas Starter Kit. To use these facilities, connect an extension board to the Starter Kit. LCD P74 P91 P90 P63 P62 P77 P104 P105 P106 P107 10MHz Xin P80/TA4OUT LCD E LCD R LCD D7 LCD D6 LCD D5 LCD D4 keymatrix P75 P76 I R - TR ANS RCV - P61 P60 P82/INT0 M30260F8AGP 4. Remote Control Specification 4.1 Remote Control Format 10ms 10ms Data section Leader section 100ms D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7 Remote control data Data section Inverted remote control data Data “0” Data “1” 1ms Per-bit waveform 1ms 1ms 3ms REJ05B0814-0110 Rev.1.10 2007.12 Page 2 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 4.2 Determination of the Leader and Data Sections When the received waveform falls within one of the ranges shown below, it is determined to be a leader or a data section. Leader section Leader low-level duration (10 ms) 8ms - 12ms Leader pulse width (20 ms) 18ms - 22ms Data section Data “0” (2ms) 1.0ms - 3.0ms Data “1” (4ms) 3.0ms - 5.0ms 4.3 Carrier Frequency 38.46kHz 13us 13us 26us REJ05B0814-0110 Rev.1.10 2007.12 Page 3 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 5. Operational Outline Each time a switch is depressed, the buzzer is sounded and remote control code is transmitted from the infrared LED. The transmitted code is received in the remote control photodetector, and the received data is shown on liquid crystal display. Liquid crystal display (LCD) IR-TRAN RCV---- Liquid crystal display (LCD) IR-TRAN R C V - - 03 Infrared LED Remote control photodetector M16C26A Code: 00H M16C26A Remote control transmission Remote control reception The operation described above is accomplished using the following microcomputer facilities: • 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, key scan and LCD display management are performed using this timer. • Timer A4 (timer mode, carrier output) This timer counts 26 microseconds using the main clock of the microcomputer as the count source. It generates a carrier (frequency 38.46 kHz) that is output during transmission. • Timer B0 (timer mode, remote control transmission “500 µs”) This timer counts 500 microseconds using the main clock of the microcomputer as the count source. It turns carrier output on and off in a 500 microsecond cycle to generate a remote control transmission waveform. • Timer B2 (timer mode, remote control reception “250 µs”) This timer counts 250 microseconds using the main clock of the microcomputer as the count source. It generates remote control receive data from the port input level in a 250 microsecond cycle. • Timer A1 (pulse modulation mode, buzzer output) This timer outputs a waveform with different high and low pulse widths using the main clock of the microcomputer as the count source. It is used to sound a buzzer each time a key is touched. REJ05B0814-0110 Rev.1.10 2007.12 Page 4 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 6. Operational Specification When a switch is depressed, the remote control code (hex code) corresponding to the switch and the inverted data (hex code) of the remote control code are transmitted. While a switch is held down, data is transmitted successively at 100 millisecond intervals. Note: In this program, pressing two or more switches at the same time has no effect (i.e., ignored). (1) Immediately after the reset switch is depressed, the LCD shows “-----.” (2) While remote control code is being received, the LCD shows the received code. * If the length of reception period is less than or equal to 500 ms, the received code is displayed for 500 ms. (1) Reset switch depressed I R - TR ANS RCV - (2) Reception underway (e.g., SW3 held down) I R - TR ANS RCV 0 1- F E (3) 500 ms after reception I R - TR ANS RCV - REJ05B0814-0110 Rev.1.10 2007.12 Page 5 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 7. Definition of the RSK Functionality and the RSK_LIB APIs and Common Functions Used by Remote Control Transmission/Reception 7.1 Definition of the RSK Functionality RSKdefine.h file In this application, the following functionalities (those shown in red) are set. /********************************************************* The boot information on CPU is defined Usually, this mode is used *********************************************************/ #define _CPU_M16C26A_NORMAL_MOD /* 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 which 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 _OPTION_USE_INFRAEDRX #define _OPTION_USE_INFRAEDTX //#define _OPTION_USE_SW //#define _OPTION_USE_LED //#define _OPTION_USE_IO Individual definition of each selected functionality #if defined _USE_KEY /* A key matrix continues pushing and existence is defined.*/ /*When not using -USE_KEY_CONTINU is made a comment. */ #define _USE_KEY_CONTINU #if defined _USE_KEY_CONTINU #define _CONTINU_SW1 _KEY_CONTEINU_ON #define _CONTINU_SW2 _KEY_CONTEINU_ON #define _CONTINU_SW3 _KEY_CONTEINU_ON #define _CONTINU_SW4 _KEY_CONTEINU_ON #define _CONTINU_SW5 _KEY_CONTEINU_ON #define _CONTINU_SW6 _KEY_CONTEINU_ON #define _CONTINU_SW7 _KEY_CONTEINU_ON #define _CONTINU_SW8 _KEY_CONTEINU_ON #define _CONTINU_SW9 _KEY_CONTEINU_ON #define _CONTINU_SW10 _KEY_CONTEINU_ON #define _CONTINU_SW11 _KEY_CONTEINU_ON #define _CONTINU_SW12 _KEY_CONTEINU_ON #define _CONTINU_SW13 _KEY_CONTEINU_ON #define _CONTINU_SW14 _KEY_CONTEINU_ON #define _CONTINU_SW15 _KEY_CONTEINU_ON #define _CONTINU_SW16 _KEY_CONTEINU_ON #else Continuous key depressions are accepted. REJ05B0814-0110 Rev.1.10 2007.12 Page 6 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 7.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_Get_Key( int *Inkey, int *ERcode ); ApiStatusType RL_Getc_Ir( int *IrCode, int *ERcode ); ApiStatusType RL_Putc_Ir( int IrCode, int *ERcode ); ApiStatusType RL_Start_Buzzer( char freqNo, int *ERcode ); ApiStatusType RL_Stop_Buzzer( int *ERcode ); ApiStatusType RL_Putc_Lcd( char Ylocation, char outc, int *ERcode ); ApiStatusType RL_Puts_LcdLoc( char Xlocation, char Ylocation, char RvTime, const char far* outc, int *ERcode ); ApiStatusType RL_Putc_LcdLoc( char Xlocation, char Ylocation, char RvTime, char outc, int *ERcode ); void RL_ErrorHook( int FuncNo, int ErrorNo ); For details about the APIs and common functions used by the sample program (remote control transmission/reception), see the Renesas Starter Kit Library V.1.00 Reference Manual. REJ05B0814-0110 Rev.1.10 2007.12 Page 7 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 8. Flowchart Remote control transmission/recept Clear display on LCD Show the initial screen Request timer setup Start timers Input keys Process buzzer Keys input? NO YES Transmit key code Check reception Check reception REJ05B0814-0110 Rev.1.10 2007.12 Page 8 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 9. 1 Tutorial Launch the HEW by double-clicking its icon. 2 Change the session name from “default Session” to “SessionM16C_E8_System.” REJ05B0814-0110 Rev.1.10 2007.12 Page 9 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 3 Select “M30260F8A” for Device. Select “Download emulator firmware” for Mode. REJ05B0814-0110 Rev.1.10 2007.12 Page 10 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) Check the box labeled “Power supply is carried out. (MAX 300mA)” and then select “5.0V.” REJ05B0814-0110 Rev.1.10 2007.12 Page 11 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 4 In the program and the work RAM text boxes of Firmware Location Address, enter “FA0” and “0B8” respectively. Leave the box labeled “Debug a program using the WDT” unchecked. REJ05B0814-0110 Rev.1.10 2007.12 Page 12 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 5 Choose Download from the Debug tab and download a module. The upper-side choices for Download show the location from which a project was downloaded. REJ05B0814-0110 Rev.1.10 2007.12 Page 13 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 6 Click “Start after Reset” to start program execution. 7 Please do "Cancellation" when "The file is opened" window opens. REJ05B0814-0110 Rev.1.10 2007.12 Page 14 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 10. Circuit Diagram 11. Part List Part name Remote control photodetector Infrared LED Transistor Tact switch Switching diode Electrolytic capacitor Chip Chip Chip resistor resistor resistor LED1 Q1 SW1 SW16 D2∼D5 C1 R1 R2 R5 4 1 1 1 1 ROHM Panasonic ROHM ROHM Panasonic 1SS355TE-17 ECE-V1HS010SR MCR10EZHF470 MCR10EZHF561 ERJ-1TRQJ6R8U 1uF/50V 47 560 6.8 1/8W, 1%(5% also acceptable) 1/8W, 1%(5% also acceptable) 1W,5% 1 1 16 Panasonic ROHM OMRON LNA2801L 2SD1898T100Q B3FS-1000P 1A/0.5W Part No. U1 Q’ty 1 Manufacturer SHARP Type number GP1UM281YK Value Remark 38kHz REJ05B0814-0110 Rev.1.10 2007.12 Page 15 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) 12. Web Sitet Renesas Technology Web site http://www.renesas.com/ REJ05B0814-0110 Rev.1.10 2007.12 Page 16 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) Revision History Rev. 1.00 1.10 Date of issue 2006.06.30 2007.12.03 Content of revision Page First revision issued RSK_LIB APIs supported Points REJ05B0814-0110 Rev.1.10 2007.12 Page 17 of 18 M16C/26A Group Sample Program (Remote Control Transmission/Reception) REJ05B0814-0110 Rev.1.10 2007.12 Page 18 of 18
B3FS-1000P 价格&库存

很抱歉,暂时无法提供与“B3FS-1000P”相匹配的价格&库存,您可以联系我们找货

免费人工找货