BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Features CPU Features • Operating voltage =16MHz: 2.0V~3.6V ♦ • Up to 0.25μs instruction cycle with 16MHz system clock at V • Power saving and wake-up functions to reduce power consumption • Oscillator types: RF External High Speed Crystal –...
Memory for storage of non-volatile data such as serial numbers, calibration data etc. By using Holtek’s In Application Programming technology, users have a convenient means to directly store their measured data in the Flash Program Memory as well as having the ability to easily update their application programs.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Absolute Maximum Ratings Supply Voltage ....................V −0.3V to V +3.6V Input Voltage ....................V −0.3V to V +0.3V Storage Temperature ..................... -50°C to 125°C Operating Temperature ....................-40°C to 85°C Total ............................-80mA Total ............................
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Sink Current for I/O Ports =0.1V — Source Current for I/O Ports =0.9V — Output Low Voltage for I/O Ports =10mA — —...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LVD/LVR Electrical Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions Typ. Typ. Low Voltage Reset Voltage — LVR enable, voltage select 1.9V -0.1 +0.1 Typ. Typ. — LVD enable, voltage select 1.9V -0.1...
Sub-1GHz RF Transmitter Flash MCU with OCDS System Architecture A key factor in the high-performance features of the Holtek range of microcontrollers is attributed to their internal system architecture. The range of the device take advantage of the usual features found within RISC microcontrollers providing increased speed of operation and enhanced performance.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS If the stack is overflow, the first Program Counter save in the stack will be lost. Program Counter Top of Stack Stack Level 1 Stack Level 2 Stack Stack Level 3 Pointer...
Program Counter and also contains data, table information and interrupt entries. Table data, which can be setup in any location within the Program Memory, is addressed by a separate table pointer register. Device Capacity BC68F2130 2K×16 BC68F2140 4K×16 BC68F2150 8K×16 BC68F2130 BC68F2140 BC68F2150 000H Reset Reset Reset 004H Interrupt Interrupt Interrupt Vectors...
Page 19
ORG statement. The value at this ORG statement is “700H” which refers to the start address of the last page within the 2K words Program Memory of the BC68F2130. The table pointer low byte register is setup here to have an initial value of “06H”. This will ensure that the first data read from the data table will be at the Program Memory address “706H”...
The provision of Flash type Program Memory provides the user with a means of convenient and easy upgrades and modifications to their programs on the same device. As an additional convenience, Holtek has provided a means of programming the microcontroller in- circuit using a 4-pin interface. This provides manufacturers with the possibility of manufacturing their circuit boards complete with a programmed or un-programmed microcontroller, and then programming or upgrading the program at a later stage.
Users can use the OCDS function to emulate the device behavior by connecting the OCDSDA and OCDSCK pins to the Holtek HT-IDE development tools. The OCDSDA pin is the OCDS Data/Address input/output pin while the OCDSCK pin is the OCDS clock input pin. When users use the OCDS function for debugging, other functions which are shared with the OCDSDA and OCDSCK pins in the device will have no effect.
Page 23
When user writes a specific value of “55H” to this register, it will generate a reset signal to reset whole chip. • FARL Register Name Bit 7~0 A7~A0: Flash Memory Address [7:0] • FARH Register – BC68F2130 Name — — — —...
Page 24
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • FARH Register – BC68F2150 Name — — — — — — — — — Bit 7~5 Unimplemented, read as “0” Bit 4~0 A12~A8: Flash Memory Address [12:8] • FD0L Register Name...
Page 25
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • FD2H Register Name Bit 7~0 D15~D8: The third Flash Memory data [15:8] • FD3L Register Name Bit 7~0 D7~D0: The fourth Flash Memory data [7:0] • FD3H Register Name Bit 7~0...
Page 26
0 0 0 0 0 11 0 x x x x x x x x 0 0 0 0 0 1 1 1 x x x x x x x x “x”: don’t care BC68F2130 Erase Block Number and Selection Rev. 1.50 January, 22, 2021...
Page 27
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Erase Block FARH [3:0] FARL [7:0] 0 0 0 0 0 0 0 0 x x x x x x x x 0 0 0 0 0 0 0 1 x x x x x x x x...
Page 28
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Erase Block FARH [4:0] FARL [7:0] 0 0 0 1 11 0 0 x x x x x x x x 0 0 0 1 11 0 1 x x x x x x x x...
Page 29
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Write Flash Memory Flash Memory Erase/Write Function Enable Procedure Set Block Erase address: FARH/FARL Set FMOD [2:0]=001 & FWT=1 →Select “Block Erase mode” & Initiate write operation FWT=0 ? Set FMOD [2:0]=000 →Select “Write Flash Mode”...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Data Memory The Data Memory is a volatile area of 8-bit wide RAM internal memory and is the location where temporary information is stored. Categorized into two types, the first of these is an area of RAM, known as the Special Function Data Memory.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Data Memory Addressing For the devices that support the extended instructions, there is no Bank Pointer for Data Memory. For Data Memory the desired Sector is pointed by the MP1H or MP2H register and the certain Data Memory address in the selected sector is specified by the MP1L or MP2L register when using indirect addressing access.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Special Function Register Description Most of the Special Function Register details will be described in the relevant functional section; however several registers require a separate description in this section. Indirect Addressing Registers – IAR0, IAR1, IAR2 The Indirect Addressing Registers, IAR0, IAR1 and IAR2, although having their locations in normal RAM register space, do not actually physically exist as normal registers.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Indirect Addressing Program Example 2 data .section ´data´ adres1 db ? adres2 db ? adres3 db ? adres4 db ? block db ? code .section at 0 ´code´ org 00h start: mov a, 04h ;...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Program Counter Low Byte Register – PCL To provide additional program control functions, the low byte of the Program Counter is made accessible to programmers by locating it within the Special Purpose area of the Data Memory. By manipulating this register, direct jumps to other program locations are easily implemented.
Page 36
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS In addition, on entering an interrupt sequence or executing a subroutine call, the status register will not be pushed onto the stack automatically. If the contents of the status registers are important and if the subroutine can corrupt the status register, precautions must be taken to correctly save it.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Oscillators Various oscillator options offer the user a wide range of functions according to their various application requirements. The flexible features of the oscillator functions ensure that the best optimisation can be achieved in terms of speed and power saving. Oscillator selection and operation are selected through the relevant control registers.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS XCLKD2 XODIV2 HXTEN RF_PDB ÷2 ÷2 IDLE0 Prescaler HIRC HIRCEN SLEEP DEEP SLEEP High Speed Oscillators Low Speed Oscillator CKS2~CKS0 LIRC IDLE2 SLEEP DEEP SLEEP LIRC System Clock Configurations External Crystal/Ceramic Oscillator – HXT The External Crystal/Ceramic System Oscillator is one of the high frequency oscillators.
As Holtek has provided the devices with both high and low speed clock sources and the means to switch between them dynamically, the user can optimise the operation of their microcontroller to achieve the best performance/power ratio.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS XODIV2 XCLKD2 HXTEN RF_PDB ÷2 ÷2 IDLE0 Prescaler HIRC HIRCEN SLEEP DEEP SLEEP High Speed Oscillators Low Speed Oscillator CKS2~CKS0 LIRC IDLE2 SLEEP DEEP SLEEP LIRC PSC0 PSC0_OUT Prescaler 0 Prescaler Time Base 0...
Page 41
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS NORMAL Mode As the name suggests this is one of the main operating modes where the microcontroller has all of its functions operational, where the 1.5V LDO is turned on with the PWDN bit in the PWRC register being low and the system clock is provided by one of the high speed oscillators.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Control Registers The registers, SCC, HIRCC, HXTC and PWRC, are used to control the system clock and the corresponding oscillator configurations. Register Name CKS2 CKS1 CKS0 — — FHIDEN FSIDEN HIRCC —...
Page 43
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Bit 0 FSIDEN: Low Frequency oscillator control when CPU is switched off 0: Disable 1: Enable This bit is used to control whether the low speed oscillator is activated or stopped when the CPU is switched off by executing an “HALT” instruction. The LIRC...
Page 44
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • PWRC Register Name PA_WAKE — — TB0_WAKE POF33V LCMD IO_ISO_EN PWDN — — — — Bit 7 PA_WAKE: Port A wake-up MCU from DEEP SLEEP Mode flag 0: No Port A wake-up MCU from DEEP SLEEP Mode occured...
Page 45
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS There are several important notes should be emphasized: 1. Before the MCU enters the DEEP SLEEP mode, the system settings should be backed up using the application program in advance. 2. When PWDN=1 and the HALT instruction is executed, the MCU will enter the DEEP SLEEP mode.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Operating Mode Switching The devices can switch between operating modes dynamically allowing the user to select the best performance/power ratio for the present task in hand. In this way microcontroller operations that do not require high performance can be executed using slower clocks thus requiring less operating current and prolonging battery life in portable applications.
Page 47
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS NORMAL Mode to SLOW Mode Switching When running in the NORMAL Mode, which uses the high speed system oscillator, and therefore consumes more power, the system clock can switch to run in the SLOW Mode by setting the CKS2~CKS0 bits to “111”...
Page 48
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS SLOW Mode to NORMAL Mode Switching In SLOW mode the system clock is derived from f When system clock is switched back to the NORMAL mode from f , the CKS2~CKS0 bits should be set to “000”~“110” and then the system clock will respectively be switched to f /64.
Page 49
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Entering the IDLE0 Mode There is only one way for the devices to enter the IDLE0 Mode and that is to execute the “HALT” instruction in the application program with the PWDN bit in the PWRC register equal to “0”, the FHIDEN bit in the SCC register equal to “0”...
Page 50
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Entering the DEEP SLEEP Mode There is only one way for the devices to enter the DEEP SLEEP Mode and that is to execute the “HALT” instruction in the application program with the PWDN bit in the PWRC register equal to “1”.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Standby Current Considerations As the main reason for entering the DEEP SLEEP, SLEEP or IDLE Mode is to keep the current consumption of the devices to as low a value as possible, perhaps only in the order of several micro- amps except in the IDLE1 and IDLE2 Mode, there are other considerations which must also be taken into account by the circuit designer if the power consumption is to be minimised.
Page 52
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS If the system is woken up from the SLEEP or IDLE Mode by an interrupt, then two possible situations may occur. The first is where the related interrupt is disabled or the interrupt is enabled but the stack is full, in which case the program will resume execution at the instruction following the “HALT”...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Watchdog Timer The Watchdog Timer is provided to prevent program malfunctions or sequences from jumping to unknown locations, due to certain uncontrollable external events such as electrical noise. Watchdog Timer Clock Source...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS The maximum time-out period is when the 2 division ratio is selected. As an example, with a 32kHz LIRC oscillator as its source clock, this will give a maximum watchdog period of around 8...
Page 56
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS VDD Power On 3/5V POR Turn on 1.5V LDO 1.5V POR MCU Execute Program from Start Internal Reset Control There is an internal reset control register, RSTC, which is used to provide a reset when the device operates abnormally due to the environmental noise interference.
Page 57
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RSTFC Register Name — — — — RSTF LVRF — — — — — — — — “x”: unknown Bit 7~4 Unimplemented, read as “0” RSTF: Reset control register software reset flag...
Page 58
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • LVRC Register Name LVS7 LVS6 LVS5 LVS4 LVS3 LVS2 LVS1 LVS0 Bit 7~0 LVS7~LVS0: LVR Voltage Select control 01010101: 1.9V 00110011: 1.9V 10011001: 1.9V 10101010: 1.9V Any other value: Generates MCU reset – register is reset to POR value When an actual low voltage condition occurs, as specified by the defined LVR voltage values above, an MCU reset will be generated.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Watchdog Time-out Reset during Normal Operation The Watchdog time-out Reset during normal operations is the same as a LVR reset except that the Watchdog time-out flag TO will be set to “1”.
Page 60
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS WDT Time-out WDT Time-out Register Power On Reset (Normal Operation) (HALT) IAR0 ● ● ● 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u u u u u u u u ●...
Page 61
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS WDT Time-out WDT Time-out Register Power On Reset (Normal Operation) (HALT) MFI0 ● ● ● - - 0 0 - - 0 0 - - 0 0 - - 0 0 - - u u - - u u MFI1 ●...
“-” stands for unimplemented Input/Output Ports Holtek microcontrollers offer considerable flexibility on their I/O ports. With the input or output designation of every pin fully under user program control, pull-high selections for all ports and wake-up selections on certain pins, the user is provided with an I/O structure to meet the needs of a wide range of application possibilities.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • PAWU Register Name PAWU7 PAWU6 PAWU5 PAWU4 PAWU3 PAWU2 PAWU1 PAWU0 PAWUn: Port A Pin wake-up function control 0: Disable 1: Enable The PAWUn bit is used to control the Port A pin wake-up function. However, the actual available bits for each device may be different.
Page 65
PAS05~PAS04: PA2 Pin-Shared function selection 00/10/11: PA2 01: PTP Bit 3~2 PAS03~PAS02: PA1 Pin-Shared function selection 00/01/10/11: PA1/PTCK Bit 1~0 PAS01~PAS00: PA0 Pin-Shared function selection 00/10/11: PA0/PTPI 01: PTPB • PAS1 Register – BC68F2130 Name — — — — PAS13 PAS12 PAS11 PAS10 —...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Programming Considerations Within the user program, one of the first things to consider is port initialisation. After a reset, all of the I/O data and port control registers will be set high. This means that all I/O pins will default to an input state, the level of which depends on the other connected circuitry and whether pull- high selections have been chosen.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS TM Operation The different types of TM offer a diverse range of functions, from simple timing operations to PWM signal generation. The key to understanding how the TM operates is to see it in terms of a free running counter whose value is then compared with the value of pre-programmed internal comparators.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS TM Input/Output Pin Selection Selecting to have a TM input/output or whether to retain its other shared function is implemented using the relevant pin-shared function selection registers, with the corresponding selection bits in each pin-shared function register corresponding to a TM input/output pin.
Page 70
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS xTM Counter Register (Read only) xTMDL xTMDH 8-bit Buffer xTMAL xTMAH xTM CCRA Register (Read/Write) PTMRPL PTMRPH PTM CCRP Register (Read/Write) Data Bus The following steps show the read and write procedures: •...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Compact Type TM – CTM Although the simplest form of the three TM types, the Compact TM type still contains three operating modes, which are Compare Match Output, Timer/Event Counter and PWM Output modes.
Page 72
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • CTMC0 Register Name CTPAU CTCK2 CTCK1 CTCK0 CTON CTRP2 CTRP1 CTRP0 Bit 7 CTPAU: CTM Counter Pause Control 0: Run 1: Pause The counter can be paused by setting this bit high. Clearing the bit to zero restores normal counter operation.
Page 73
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • CTMC1 Register Name CTM1 CTM0 CTIO1 CTIO0 CTOC CTPOL CTDPX CTCCLR Bit 7~6 CTM1~CTM0: Select CTM Operating Mode 00: Compare Match Output Mode 01: Undefined 10: PWM Output Mode 11: Timer/Counter Mode These bits setup the required operating mode for the CTM.
Page 74
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS This is the output control bit for the CTM output pin. Its operation depends upon whether CTM is being used in the Compare Match Output Mode or in the PWM Output Mode. It has no effect if the CTM is in the Timer/Counter Mode. In the Compare Match Output Mode it determines the logic level of the CTM output pin before a compare match occurs.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • CTMAL Register Name Bit 7~0 D7~D0: CTM CCRA Low Byte Register bit 7 ~ bit 0 CTM 10-bit CCRA bit 7 ~ bit 0 • CTMAH Register Name — — —...
Page 78
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Timer/Counter Mode To select this mode, bits CTM1 and CTM0 in the CTMC1 register should be set to 11 respectively. The Timer/Counter Mode operates in an identical way to the Compare Match Output Mode generating the same interrupt flags.
Page 79
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Counter Value CTDPX = 0; CTM [1:0] = 10 Counter cleared by CCRP Counter Reset when CTON returns high CCRP Counter Stop if Pause Resume CTON bit low CCRA Time CTON CTPAU CTPOL CCRA Int.
Page 80
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Counter Value CTDPX = 1; CTM [1:0] = 10 Counter cleared by CCRA Counter Reset when CTON returns high CCRA Counter Stop if Pause Resume CTON bit low CCRP Time CTON CTPAU CTPOL CCRP Int.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Periodic Type TM – PTM The Periodic Type TM contains five operating modes, which are Compare Match Output, Timer/ Event Counter, Capture Input, Single Pulse Output and PWM Output modes. The Periodic TM can be controlled with two external input pins and can drive two external output pins.
Page 83
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • PTMC1 Register Name PTM1 PTM0 PTIO1 PTIO0 PTOC PTPOL PTCAPTS PTCCLR Bit 7~6 PTM1~PTM0: Select PTM Operating Mode 00: Compare Match Output Mode 01: Capture Input Mode 10: PWM Output Mode or Single Pulse Output Mode 11: Timer/Counter Mode These bits setup the required operating mode for the PTM.
Page 84
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Bit 3 PTOC: PTM PTP Output control bit Compare Match Output Mode 0: Initial low 1: Initial high PWM Output Mode/Single Pulse Output Mode 0: Active low 1: Active high This is the output control bit for the PTM output pin. Its operation depends upon whether PTM is being used in the Compare Match Output Mode or in the PWM Output Mode/Single Pulse Output Mode.
Page 85
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • PTMAL Register Name Bit 7~0 D7~D0: PTM CCRA Low Byte Register bit 7 ~ bit 0 PTM 10-bit CCRA bit 7 ~ bit 0 • PTMAH Register Name — — —...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Periodic Type TM Operating Modes The Periodic Type TM can operate in one of five operating modes, Compare Match Output Mode, PWM Output Mode, Single Pulse Output Mode, Capture Input Mode or Timer/Counter Mode. The operating mode is selected using the PTM1 and PTM0 bits in the PTMC1 register.
Page 89
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Timer/Counter Mode To select this mode, bits PTM1 and PTM0 in the PTMC1 register should be set to 11 respectively. The Timer/Counter Mode operates in an identical way to the Compare Match Output Mode generating the same interrupt flags.
Page 90
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Counter Value PTM [1:0] = 10 Counter cleared by CCRP Counter Reset when PTON returns high CCRP Counter Stop if Pause Resume PTON bit low CCRA Time PTON PTPAU PTPOL CCRA Int.
Page 91
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Single Pulse Output Mode To select this mode, bits PTM1 and PTM0 in the PTMC1 register should be set to 10 respectively and also the PTIO1 and PTIO0 bits should be set to 11 respectively. The Single Pulse Output Mode, as the name suggests, will generate a single shot pulse on the PTM output pin.
Page 92
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Counter Value PTM [1:0] = 10 ; PTIO [1:0] = 11 Counter stopped by CCRA Counter Reset when PTON returns high CCRA Counter Stops Resume Pause by software CCRP Time PTON Auto. set by...
Page 93
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Capture Input Mode To select this mode bits PTM1 and PTM0 in the PTMC1 register should be set to 01 respectively. This mode enables external signals to capture and store the present value of the internal counter and can therefore be used for applications such as pulse width measurements.
Page 94
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Counter Value PTM [1:0] = 01 Counter cleared by CCRP Counter Counter Stop Reset CCRP Resume Pause Time PTON PTPAU Active Active Active edge edge edge PTM capture pin PTPI or PTCK CCRA Int.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS RF Transmitter The RF transmitter is a fully integrated transmitter, which is capable of using both Frequency- Shift Keying (FSK) and On-Off Keying (OOK) modulation modes for data streaming. It has two main operating modes, Burst Mode and Direct Mode. The RF transmitter operates in the 315/433/868/915MHz frequency bands.
Page 97
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RF_CLK2 Register – RF Clock Control Register 2 Name DTR7 DTR6 DTR5 DTR4 DTR3 DTR2 DTR1 DTR0 DTR7~DTR0: RF data rate setting Bit 7~0 RF data rate=100kHz/(DTR[7:0]+1) Note: The XO_SEL[2:0] bits and the XODIV2 bit in the RF_XO2 register should first be set to get the correct reference clock.
Page 98
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Bit 2~0 D2~D0: Reserved bits Note: It is recommended that the register content should be kept as POR value. • RF_VCO1 Register – RF VCO Control Register 1 Name VCO_SWHB Bit 7 VCO_SWHB: VCO 2.5GHz frequency band switch control...
Page 99
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Two examples for implementing a DFC calibration are provided below. • Implement DFC calibration after each power on condition Step 1: System power on reset, DFC_OW=0 and RF_PDB=0 by default option Step 2: Set ACAL_EN=1 to enable the auto DFC calibration, and wait until ACAL_EN is cleared to 0...
Page 100
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RF_DFC_CAL Register – RF VCO DFC Calibration Control Register Name CT_MMDLDO1 CT_MMDLDO0 — — — CT_MMDLDO1~CT_MMDLDO0: MMD LDO voltage setting Bit 7~6 00: 1.35V 01: 1.5V 10: 1.65V 11: 1.8V Bit 5 Unimplemented, read as “0”...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RF_XO2 Register – RF XO Control Register 2 Name — — XODIV2 XO_SEL2 XO_SEL1 XO_SEL0 — — — — Bit 7 Unimplemented, read as “0” Bit 6~5 D6~D5: The recommended setting values are summarized in the following table.
Page 102
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RF_OPER Register – RF Operation Control Register Name — — FSK_EN DIR_EN — — — TX_STROBE — — — — — — — — — — Bit 7~6 Unimplemented, read as “0”...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RF_OPMOD Register – RF Operation Mode Control Register Name — — — — — ACAL_EN TX_EN SX_EN — — — — — — — — — — Bit 7~3 Unimplemented, read as “0”...
Page 104
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • Extend FIFO Mode The Extend FIFO mode is used for large data packet length up to 256 bytes. The physical FIFO length is 128 bytes. To extend the available transmit length in one packet, a handshake mechanism is needed between the MCU and FIFO.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RF_FIFO_CTRL4 Register – RF FIFO Control Register 4 Name DTXD — — — TXFFLT FFMG_EN FFMG1 FFMG0 — — — — — — Bit 7 DTXD: Direct mode TX data setting Bit 6~4 Unimplemented, read as “0”...
Page 106
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • RF_SX2 Register – RF Fractional-N Synthesizer Control Register 2 Name Bit 7~0 DK7~DK0: Low byte of 20-bit fractional of dividend for MMD Set an initial value to implement XO=16MHz and TX band=433.92MHz.
Page 108
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS 7. Set DIR_EN=0 to select the Burst Mode, set FSK_EN=0(OOK)/1(FSK), set TX_STROBE=1 to start the transmission. Then the data in FIFO will be automatically transfered to the RFOUT pin with FSK or OOK modulation.
Page 109
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Note: When in the Direct Mode and a data transfer has completed, to allow the RF circuit to enter the power down mode to save power consumption, users must configure the related bits in the correct order as described in step11 and step12, otherwise an undesirable standby current will be generated.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Interrupts Interrupts are an important part of any microcontroller system. When an external event or an internal function such as a Timer Module requires microcontroller attention, their corresponding interrupt will enforce a temporary suspension of the main program allowing the microcontroller to direct attention to their respective needs.
Page 111
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • INTEG Register Name — — — — INT1S1 INT1S0 INT0S1 INT0S0 — — — — — — — — Bit 7~4 Unimplemented, read as “0” Bit 3~2 INT1S1~INT1S0: Interrupt edge control for INT1 pin...
Page 112
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • INTC1 Register Name MFI2F MFI1F MFI0F TB1F MFI2E MFI1E MFI0E TB1E Bit 7 MFI2F: Multi-function interrupt 2 request flag 0: No request 1: Interrupt request Bit 6 MFI1F: Multi-function interrupt 1 request flag...
Page 113
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • MFI1 Register Name — — PTMAF PTMPF — — PTMAE PTMPE — — — — — — — — Bit 7~6 Unimplemented, read as “0” Bit 5 PTMAF: PTM Comparator A match interrupt request flag...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Interrupt Operation When the conditions for an interrupt event occur, such as a TM Comparator P or Comparator A match etc., the relevant interrupt request flag will be set. Whether the request flag actually generates a program jump to the relevant interrupt vector is determined by the condition of the interrupt enable bit.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Legend EMI auto disabled in ISR Request Flag, no auto reset in ISR Interrupt Request Enable Master Vector Priority Name Flags Bits Enable Request Flag, auto reset in ISR High Enable Bits...
Page 116
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS take place. When the interrupt is serviced, the respective interrupt request flag, TB0F or TB1F, will be automatically reset and the EMI bit will be cleared to disable other interrupts. The Time Base clock source, f...
Page 117
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS • TB0C Register Name TB0ON TB0_PRE2 TB0_PRE1 TB0_PRE0 — TB02 TB01 TB00 — — Bit 7 TB0ON: Time Base 0 Control 0: Disable 1: Enable Bit 6~4 TB0_PRE2~TB0_PRE0: Select Time Base 0 Time-out Period from f...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Multi-function Interrupts Within the devices there are up to three Multi-function interrupts. Unlike the other independent interrupts, these interrupts have no independent source, but rather are formed from other existing interrupt sources, namely the TM Interrupts, LVD Interrupt, RF FFMG length margin Interrupt and RF Burst Mode Transmit Complete Interrupt.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LVD Interrupt The Low Voltage Detector Interrupt is contained within the Multi-function Interrupt. An LVD Interrupt request will take place when the LVD Interrupt request flag, LVDF, is set, which occurs when the Low Voltage Detector function detects a low power supply voltage. To allow the program to branch to its interrupt vector address, the global interrupt enable bit, EMI, Low Voltage Interrupt enable bit, LVDE, and associated Multi-function interrupt enable bit, must first be set.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Programming Considerations By disabling the relevant interrupt enable bits, a requested interrupt can be prevented from being serviced, however, once an interrupt request flag is set, it will remain in this condition in the interrupt register until the corresponding interrupt is serviced or until the request flag is cleared by the application program.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Low Voltage Detector – LVD The device has a Low Voltage Detector function, also known as LVD. This enables the device to monitor the power supply voltage, V , and provide a warning signal should it fall below a certain level.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LVD Operation The Low Voltage Detector function operates by comparing the power supply voltage, V , with a pre-specified voltage level stored in the LVDC register. This has a range of between 1.9V and 3.3V.
In the case of Holtek microcontroller, a comprehensive and flexible set of over 60 instructions is provided to enable programmers to implement their application with the minimum of programming overheads.
The standard logical operations such as AND, OR, XOR and CPL all have their own instruction within the Holtek microcontroller instruction set. As with the case of most instructions involving data manipulation, data must pass through the Accumulator which may involve additional programming steps.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Instruction Set Summary The instructions related to the data memory access in the following table can be used when the desired data memory is located in Data Memory sector 0. Table Conventions...
Page 127
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Mnemonic Description Cycles Flag Affected Data Move MOV A,[m] Move Data Memory to ACC None MOV [m],A Move ACC to Data Memory Note None MOV A,x Move immediate data to ACC None Bit Operation CLR [m].i...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Extended Instruction Set The extended instructions are used to support the full range address access for the data memory. When the accessed data memory is located in any data memory sector except sector 0, the extended instruction can be used to directly access the data memory instead of using the indirect addressing access.
Page 129
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Mnemonic Description Cycles Flag Affected Branch LSZ [m] Skip if Data Memory is zero Note None LSZA [m] Skip if Data Memory is zero with data movement to ACC Note None LSNZ [m]...
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Instruction Definition ADC A,[m] Add Data Memory to ACC with Carry Description The contents of the specified Data Memory, Accumulator and the carry flag are added. The result is stored in the Accumulator.
Page 131
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS CALL addr Subroutine call Description Unconditionally calls a subroutine at the specified address. The Program Counter then increments by 1 to obtain the address of the next instruction which is then pushed onto the stack.
Page 132
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS DEC [m] Decrement Data Memory Description Data in the specified Data Memory is decremented by 1. Operation [m] ← [m] − 1 Affected flag(s) Decrement Data Memory with result in ACC DECA [m] Description Data in the specified Data Memory is decremented by 1.
Page 133
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS No operation Description No operation is performed. Execution continues with the next instruction. Operation No operation Affected flag(s) None Logical OR Data Memory to ACC OR A,[m] Description Data in the Accumulator and the specified Data Memory perform a bitwise logical OR operation.
Page 134
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS RLA [m] Rotate Data Memory left with result in ACC Description The contents of the specified Data Memory are rotated left by 1 bit with bit 7 rotated into bit 0. The rotated result is stored in the Accumulator and the contents of the Data Memory remain unchanged.
Page 135
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS RRCA [m] Rotate Data Memory right through Carry with result in ACC Description Data in the specified Data Memory and the carry flag are rotated right by 1 bit. Bit 0 replaces the Carry bit and the original carry flag is rotated into bit 7.
Page 136
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS SET [m] Set Data Memory Description Each bit of the specified Data Memory is set to 1. Operation [m] ← FFH Affected flag(s) None Set bit of Data Memory SET [m].i Description Bit i of the specified Data Memory is set to 1.
Page 137
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Subtract Data Memory from ACC with result in Data Memory SUBM A,[m] Description The specified Data Memory is subtracted from the contents of the Accumulator. The result is stored in the Data Memory. Note that if the result of subtraction is negative, the C flag will be cleared to 0, otherwise if the result is positive or zero, the C flag will be set to 1.
Page 138
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS TABRD [m] Read table (specific page) to TBLH and Data Memory Description The low byte of the program code (specific page) addressed by the table pointer (TBLP and TBHP) is moved to the specified Data Memory and the high byte moved to TBLH.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Extended Instruction Definition The extended instructions are used to directly access the data stored in any data memory sections. LADC A,[m] Add Data Memory to ACC with Carry Description The contents of the specified Data Memory, Accumulator and the carry flag are added.
Page 140
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LCPL [m] Complement Data Memory Description Each bit of the specified Data Memory is logically complemented (1′s complement). Bits which previously contained a 1 are changed to 0 and vice versa. Operation [m] ←...
Page 141
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LMOV A,[m] Move Data Memory to ACC Description The contents of the specified Data Memory are copied to the Accumulator. Operation ACC ← [m] Affected flag(s) None Move ACC to Data Memory...
Page 142
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LRR [m] Rotate Data Memory right Description The contents of the specified Data Memory are rotated right by 1 bit with bit 0 rotated into bit 7. Operation [m].i ← [m].(i+1); (i=0~6) [m].7 ←...
Page 143
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LSDZ [m] Skip if decrement Data Memory is 0 Description The contents of the specified Data Memory are first decremented by 1. If the result is 0 the following instruction is skipped. As this requires the insertion of a dummy instruction while the next instruction is fetched, it is a three cycle instruction.
Page 144
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LSNZ [m] Skip if Data Memory is not 0 Description If the content of the specified Data Memory is not 0, the following instruction is skipped. As this requires the insertion of a dummy instruction while the next instruction is fetched, it is a three cycle instruction.
Page 145
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS LSZ [m].i Skip if bit i of Data Memory is 0 Description If bit i of the specified Data Memory is 0, the following instruction is skipped. As this requires the insertion of a dummy instruction while the next instruction is fetched, it is a three cycle instruction.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS Package Information Note that the package information provided here is for consultation purposes only. As this information may be updated at regular intervals users are reminded to consult the Holtek website the latest version of the Package/Carton information.
BC68F2130/BC68F2140/BC68F2150 Sub-1GHz RF Transmitter Flash MCU with OCDS SAW Type 24-pin QFN (4mm×4mm×0.75mm) Outline Dimensions Dimensions in inch Symbol Min. Nom. Max. 0.028 0.030 0.031 0.000 0.001 0.002 — 0.008 BSC — 0.007 0.010 0.012 — 0.157 BSC — —...
Page 151
However, Holtek assumes no responsibility arising from the use of the specifications described. The applications mentioned herein are used solely for the purpose of illustration and Holtek makes no warranty or representation that such applications will be suitable without further modification, nor recommends the use of its products for application that may present a risk to human life due to malfunction or otherwise.
Need help?
Do you have a question about the BC68F2130 and is the answer not in the manual?
Questions and answers