|
Basic Information
Question 1
What are the contents of the HT82XX Keyboard/Mouse/Joystick MCUs?
Answer
HT82XX Keyboard/Mouse/Joystick MCUs consist of the following three series, HT82K68A/HT82K68E PS/2 multimedia or wireless keybaord encoder MCU, HT82K94A/E, HT82K95A/E, HT82K96A/E PS/2 + USB keybaord encoder MCU and HT82J97A/E, HT82M99A/E PS/2 + USB mouse encoder MCU. Items suffixed with "A" are Mask Type MCUs, while items suffixed with "E" are OTP Type MCUs. The specifications and description of each device can be found in its relevant data sheet.
Question 2
What is the operating frequency of the HT82XX Keyboard/Mouse/Joystick MCUs?
Answer
-
HT82K68A/HT82K68E operating frequency:
For 5V/3.3V or 3-cell battery applications, the maximum operating frequency is 8MHz (3.3V). For 3V or 2-cell battery applications the maximum operating frequency is 4MHz
(2.2V)
-
HT82K96A/HT82K96E operating frequency:
For 5V USB applications, the operating frequency must choose 6MHz or 12MHz, which is selected by the SYSCLK bit of SCC Register.
For other 5V applications, the operating frequency range is 1MHz~12MHz.
Question 3
How many ADC modes do HT82K96A/E and HT82J97A/E have ?
Answer
The ADC has internal and external ADC mode according to the reference voltage. In the internal ADC mode, the ADC reference voltage is VDD-GND. In the external ADC mode, the reference voltage is "VRH-VRL". Choose external ADC mode if you need a precise ADC data output.
Question 4
How many bits of resolution do the HT82K96A/E and HT82J97A/E ADC have?
Answer
The internal ADC within the HT82K96A/E and HT82J97A/E are 8-bit types, whose value can be obtained using the ADR internal register.
Question 5
How many channels are do the ADC within the HT82K96A/E and HT82J97A/E ADC have?
Answer
The devices have 6 channels, known as AN0, AN1, AN2, AN3, AN4 and AN5. The programmer can use the ACS0~ACS2 bits, which are bit0~bit2 in the ADSC register, to select the required channel.
Question 6
How many sampling clocks does the ADC within the HT82K96A/E and HT82J97A/E, have?
Answer
The HT82K96A/E and HT82J97A/E have 4 kinds of ADC sampling clock sources, namely 6MHz, 3MHz, 1.5MHz and 0.75MHz. The programmer can chose the required clock source by programming the ADCS0~ADCS1 bits in the ADSC Register.
Question 7
What is the address of the USB interface register?
Answer
With the exception of the HT82K68A/E, the USB interface associated registers for the HT82XX Keyboard/Mouse/Joystick MCU series devices, are placed in Bank0 RAM at addresses 1AH~1CH (USC, USR and SCC registers) and Bank1 RAM at addresses 41H~4BH (Pipe_ctrl, AWR, STALL, PIPE, SIES, MISC and FIFO0~FIFO3). There are some small differences in the Bank1 RAM internal Registers for different part numbers. For more details on the specification please consult the Holtek Data Sheet.
Question 8
With the exception of the HT82K68A/E, what type of USB specification is supported by the HT82XX Keyboard/Joystick MCU devices?
Answer
The USB 1.1 Low speed spec. and the HID 1.1 spec are both supported.
Question 9
With the exception of the HT82K68A/E, how many Endpoints do the HT82XX Keyboard/Joystick MCU devices have?
Answer
The HT82K96A/E devices have 4 endpoints (1 control endpoint and 3 Interrupt endpoints). The HT82K95A/E has 3 endpoints (1 control endpoint and 2 Interrupt endpoints). The HT82J97A/E and HT82M99A/E devices have 2 endpoints (1 control endpoint and 1 Interrupt endpoint). Each endpoint each has a corresponding 8 X 8 byte FIFO buffer.
Question 10
What is the interrupt endpoint?
Answer
With the exception of the HT82K68A/E, the HT82XX Interrupt Endpoints, each have an 8 X 8 FIFO buffer which can support a USB Interrupt transfer transmission. The HID class Keyboard or mouse data can utilise this Interrupt Endpoint to transmit data to the PC. For the details regarding this Interrupt transfer please consult the USB 1.1 specification.
Functional Description
Question 1
What are the differences between the various devices in the HT82 Keyboard/Mouse/Joystick
MCUs?
Answer
Please check on the table below for the differences. For more detailed information consult the data sheet.
| Part
No. |
VDD |
Clock
Mode |
Program
Memory |
Data
Memory |
Interface |
I/O |
Timer |
A/D |
PWM |
Stack |
Package |
| SRAM |
EEPROM |
8-bit |
16-bit |
HT82K68E
HT82K68A |
2.2V~
5.5V |
RC/Crystal |
3Kx16 |
160x8 |
-- |
PS/2 |
37 |
1 |
-- |
-- |
-- |
6 |
20/28SOP,
48SSOP |
HT82K94E
HT82K94A* |
2.2V~
5.5V |
Crystal |
6Kx16 |
224x8 |
-- |
USB+PS/2 |
40 |
1 |
1 |
-- |
-- |
8 |
40DIP,
48SSOP |
HT82K95E
HT82K95A |
4.2V~
5.5V |
Crystal |
4Kx15 |
160x8 |
-- |
USB+PS/2 |
32 |
1 |
1 |
8-bitx6ch |
-- |
8 |
20/28SOP,
20/48SSOP |
HT82K95EE
HT82K95AE |
4.2V~
5.5V |
Crystal |
4Kx15 |
160x8 |
128x8 |
USB+PS/2 |
32 |
1 |
1 |
8-bitx6ch |
-- |
8 |
20/28SOP |
HT82K96E
HT82K96A |
4.4V~
5.5V |
Crystal |
4Kx15 |
160x8 |
-- |
USB+PS/2 |
32 |
1 |
1 |
8-bitx6ch |
-- |
8 |
20SOP,
48SSOP |
HT82J97E
HT82J97A |
4.0V~
5.5V |
Crystal |
2Kx14 |
96x8 |
-- |
USB+PS/2 |
20 |
-- |
1 |
8-bitx6ch |
8-bitx2 |
4 |
20/28SOP |
HT82M99E
HT82M99A |
4.0V~
5.5V |
Crystal |
2Kx14 |
96x8 |
-- |
USB+PS/2 |
12 |
-- |
1 |
-- |
-- |
4 |
18/20DIP,
18/20SOP |
HT82M99EE
HT82M99AE |
4.0V~
5.5V |
Crystal |
2Kx14 |
96x8 |
128x8 |
USB+PS/2 |
12 |
-- |
1 |
-- |
-- |
4 |
20DIP/SOP |
Question 2
How to use the indirect memory addressing mode?
Answer
First the address to be read or written must be placed in the relevant memory pointer, known as MP. After this any instruction that refers to the Indirect Register, known as
IAR, (e.g. MOV a, IAR) will result in action taking place on data pointed to by the memory pointer (MP). Indirect memory addressing is particularly useful for operations on data arrays by first placing the first array address in the memory pointer. Data can then be read or written from different places in the array by manipulating the data pointer.
Question 3
How are the table read instructions used and are there any special points to note?
Answer
There are two kinds of table read instructions, the first is the TABRDC instruction which is used to read data from the present program memory page. The second is the TABRDL statement which can read data from the last page of program memory. When reading data from tables it is first necessary to place the low byte of the program memory address where the data is stored, into the table pointer register
TBLP. The table read instruction can then be executed which will place the low byte of the table data into the register indicated by the table read instruction. The high byte of the table data will be placed into the TBLH register. Note that the highest unimplemented bits in the data high byte will read as "0".
Question 4
If the WDT oscillator clock is selected how is the WDT timing calculated?
Answer
The WDT oscillator period at an operating voltage of 5V ranges from 8 ms to 33 ms. The watchdog overflow time is the oscillator period x
2(WS2~WS0). For example if WS2~WS0 = 7H then the watchdog overflow time will range from 8 ms x
27=1 sec to 33 ms x 27=4.2 sec.
Question 5
What is the difference between choosing the WDT oscillator or the fSYS/4 clock as the WDT clock source?
Answer
If the WDT oscillator clock is chosen as the clock source then if the system enters a HALT condition the WDT timer will continue to function. When the WDT time-outs the system will be woken up from its HALT state. If the fSYS/4 clock is chosen as the WDT clock source then the WDT will cease to function and system will not be woken up when a HALT state is entered. The cost in choosing the WDT oscillator is that some power will be consumed by its clock. For systems that operate with HALT feature and need not to be woken up from HALT by WDT overflow, in this case the fSYS/4 clock source should be selected.
Question 6
What is the purpose of 2 CLR WDT instructions?
Answer
Two CLR WDT instructions feature increases the system reliability. If the program contains two loops in the main program a CLR WDT1 instruction can be placed in one loop and a CLR WDT2 instruction in the other loop. If a malfunction occurs, perhaps due to noise, and the program enters an infinite loop none of the CLR instructions in the other loop will be executed, therefore the WDT will overflow and generate a reset signal to reset the
MCU.
Question 7
How is the 8-bit timer setup?
Answer
The 8-bit timer/counter is a count up timer which upon reaching a count of 255 (0FFH) will reset itself to 00H and generate an internal interrupt signal. To obtain different timer counts, say N, of less than 256, the timer should be first preset with a fixed value of 256-N. After setting up this preset value the timer should be activated which will enable it to count from this preset value to 255. The value that the timer is to count N, is therefore given by the formula 256-(256-N)=N.
Question 8
How is the 16-bit timer setup?
Answer
The 16-bit timer/counter is a count up counter, which upon reaching a value of 65535 (0FFFFH) will reset itself to 0000H and generate an internal interrupt signal. To obtain different timer counts, say N, of less than 65536, the timer should be first preset with a fixed value of 65536-N. After setting up this preset value the timer should be activated which will enable it to count from this preset value to 65535. The value that the timer is to count N, is therefore given by the formula 65536-(65536-N)=N.
Question 9
What is the access sequence of the 16-bit Timer/Counter?
Answer
For the HT82 Keyboard/Mouse type series of MCUs, the internal data bus is 8-bit wide, therefore for the 16-bit Timer/Counter, the user has to write the Low Byte data first and then write the high byte data. To read the Timer/Counter contents, the user has to first read the High Byte data first and then the Low Byte data.
Question 10
How is 8-bit Timer/Counter setup in the Timer Mode?
Answer
There are three modes available for the 8-bit Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To setup in the Timer Mode, the following process should be followed:
-
Set to Timer Mode by writing 10H to TM1, TM0
-
Set the initial timer TMR value
-
Enable the corresponding interrupt by setting the ETI and EMI bit
-
Start the Timer by setting the TON bit of the TMRC
Once the Timer is enabled, it will count up and will be stopped when the TON bit in the TMRC register is cleared. If the Timer is enabled once again, the counter will start counting from the value where it was stopped. If the Timer overflows, an internal interrupt request will be issued and the TMR will be reloaded with the initial value.
Question 11
How is the HT82K96A/HT82K96E 16-bit Timer/Counter setup in the Timer Mode?
Answer
For HT82K96A/HT82K96E, there are three modes available for the 16-bit Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To setup in the Timer Mode, the following process should be followed:
-
Set to Timer Mode by writing 10H to TM1, TM0
-
Set the initial timer TMR value
-
Enable the corresponding interrupt by setting the ETI and EMI bit
-
Start the Timer by setting the TON bit of the TMRC
Once the Timer is enabled, it will count up and will be stopped when the TON bit in the TMRC register is cleared. If the Timer is enabled once again, the counter will start counting from the value where it was stopped. If the Timer overflows, an internal interrupt request will be issued and the TMR will be reloaded with the initial value.
Question 12
How is the HT82K96A/HT82K96E Timer/Counter setup in the Event Counter Mode?
Answer
For HT82K96A/HT82K96E, there are three modes available for the Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To set in the
Event Counter Mode, the following process should be followed:
-
Set to Event Counter Mode by writing 01H to TM1, TM0
-
Select TE=1 to count on the falling edge and TE=0 to count on the rising edge
-
Set the Timer initial value into TMR
-
Enable the corresponding interrupt by setting the ETI and EMI bits
-
Start the Timer by setting the TON bit in the TMRC register
Question 13
How is the HT82K96A/HT82K96E 8-bit Timer/Counter setup in the Pulse Width Mode?
Answer
For HT82K96A/HT82K96E, there are three modes available for the Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To set in the
Pulse Width Mode, the following process should be followed:
-
Set to Pulse Width Mode by writing 11H to TM1, TM0
-
Select TE=1 to measure a High Pulse Width and TE=0 to measure a Low Pulse Width
-
Set the Timer initial value, TMR, usually set to 0H for
Pulse Width Measurements
-
Enable the corresponding interrupt by setting the ETI and EMI bits
-
Start the Timer by setting the TON bit in the TMRC
After the Timer/Counter is enabled, the user can poll the TON bit, if one pulse measurement is complete, the TON bit will be cleared to 0 and the count value multiplied by 2
n+1 is the measured pulse width.
Question 14
How are the HT82K96A/E, HT82K95A/E 16-bit Timer/Counter setup in the Pulse Width Mode?
Answer
For HT82K96A/E and HT82K95A/E, there are three modes available for the Timer/Counter, i.e. Timer Mode, Event Counter Mode and Pulse Width Mode. To set in the
Pulse Width Mode, the following
process should be followed:
-
Set to Pulse Width Mode by writing 11H to TM1, TM0
-
Select TE=1 to measure a High Pulse Width and TE=0 to measure a Low Pulse Width
-
Set the Timer initial value, TMR, usually set to 0H for Pulse Width Measurements
-
Enable the corresponding interrupt by setting the ETI and EMI bits
-
Start the Timer by setting the TON bit in the TMRC
After the Timer/Counter is enabled, the user can poll the TON bit, if one pulse measurement is complete, the TON bit will be cleared to 0 and the value in the counter will be the pulse width measured.
Question 15
What's the control endpoint?
Answer
The Control Endpoint of HT82K96A/HT82K96E has a built-in 8x8 bytes FIFO buffer for the USB control transfer. All USB commands are transferred through the control endpoint.
Question 16
For Holtek's MCUs, is there any way to reset the stack pointer
other than by a chip RESET?
Answer
The stack pointer is affected by the execution of interrupts as
well as by any subroutine calls which occur in the application
program. In addition, any return instructions will also affect the
stack pointer. However, it is not possible for the user to
directly reset the stack pointer by any means other than the chip
RESET.
Question 17
What is the function of the WDT?
Answer
The WDT is designed to monitor the MCU software and hardware
operations. Users should employ the CLEAR WDT (CLR WDT or CLR WDT1
and CLR WDT2 ) instructions should any abnormal operation or
malfunction happens when a WDT overflow would occur which will
then reset the MCU to resume normal operation. The WDT monitoring
effects mainly depend on the software program design.
Question 18
How is the Remote Wake-up function setup in the HT82K94E/HT82K94A?
Answer
This is implemented using bit 0 in the AWR register. By setting the bit to 0 the function is off, while if set to 1 the Remote Wake-up function will be turned on.
Application Description
- Question 1
As there are no Push and POP instructions, when an
interrupt occurs how is the data backed-up?
- Question 2
Can the Call instruction be used within an interrupt
routine?
- Question 3
When an interrupt is being serviced will other occurring
identical interrupts be effective?
- Question 4
How should unused I/O pins be managed?
- Question 5
When in HALT mode why does the device continue to consume
power?
- Question 6
Why, when PA (and PC0~PC3 for HT82K68A/HT82K68E) is low the
device cannot wake up?
- Question 7
Why, when a low going edge is presented on the external
interrupt pin the MCU does not wake-up?
- Question 8
Is it possible to disable the wake-up function of the
external interrupt?
- Question 9
What is the constraints on VDD during Power On?
- Question 10
When use HT82K68A/HT82K68E I/O pin,
are there any special points to note?
- Question 11
How is the HT82K96A/HT82K96E ADC setup?
- Question 12
How to read/write the control endpoint or interrupt
endpoints data?
- Question 13
How to read the FIFO data?
- Question 14
How do I know the FIFO data is zero length handshake ?
- Question 15
How do I write FIFO data?
- Question 16
How to generate a zero length handshake data?
- Question 17
How do I set the FIFO as input or output?
- Question 18
How do I match the FIFO pointer register with an
endpoints?
- Question 19
How do I know if there's a USB signal?
- Question 20
How do I know if it's the USB Suspend signal?
- Question 21
How do I know if it's the USB Resume signal?
- Question 22
How do I know if it's the USB Read/Write Endpoint?
- Question 23
How do I know if it's the USB Pre-Reset?
- Question 24
How the current in the USB Suspend mode can be less than
500 A ?
- Question 25
How do I ensure HT82K96A/HT82K96E USB SIE working
normally?
- Question 26
How do I set the mode to USB or PS/2?
- Question 27
Can user read the D+ and D- signals in the USB mode?
- Question 28
How can user write the CLK, DATA signals in the PS/2 mode?
- Question 29
If the RC oscillator is selected as
the system clock, what are the purposes of the external
resistor and capacitor? Can the capacitor be omitted?
- Question 30
When using a 3-pin resonator/crystal in my MCU
application can the capacitor be connected to VDD instead of
VSS?
- Question 31
When writing my program, if I want to create a
Table in Program Memory, how do I start my table at a specific
address? If the ORG statement is not suitable are their other
methods of implementation?
- Question 32
The HT82K96A/E has 4 endpoints, can they all
be used?
- Question 33
In the HT82K94E/HT82K94A, there is a directly addressable TBHP register, how is it used?
Question 1
As there are no Push and POP instructions, when an interrupt occurs how is the data backed-up?
Answer
Although there are no PUSH or POP instructions, the programmer can still assign memory space. (Example db: ACCStack for ACC Storage) to store the interrupt backup data. To do this first store the ACC data in an area of memory, after which the status register and other data to be stored can be stored in similar dedicated memory locations. Before returning to the main program the data should be retrieved similarly but in a reverse order i.e. ACC is the last to be retrieved. When this is completed a RETI instruction should be executed to return to the main program.
Question 2
Can the Call instruction be used within an interrupt routine?
Answer
Because of the limitations in size of the MCU Stack, programmers must be exceptionally careful if using a call instruction inside an interrupt routine. If the program is in an interrupt routine and the stack is full, then executing a call instruction will result in a stack-over situation preventing the program from returning properly from the interrupt routine. Therefore if it is necessary to execute call instruction from within interrupt routines it is imperative that the worst case condition regarding stack requirements are considered. Before entering interrupt routines it is essential to verify that enough stack levels are available.
Question 3
When an interrupt is being serviced will other occurring identical interrupts be effective?
Answer
In normal operation when the MCU enters an interrupt routine the EMI flag will be cleared (EMI=0), which will prevent any corresponding interrupts from being serviced. However if the program is used to actively set the EMI flag (EMI=1) when an interrupt is being serviced then if the stack is not full, all other interrupts (including identical interrupts) will be effective. If multiple interrupts are necessary the programmer must take great care to ensure that the backed up data from the present interrupt is not corrupted by any following interrupts. Unless in cases of absolute necessity it is strongly recommended that multiple interrupts are not permitted.
Question 4
How should unused I/O pins be managed?
Answer
Any unused I/O pins should be managed properly so as to prevent from power consuming. The best method to prevent this is to set any unused pins as outputs however if set as inputs they should be selected to have a pull up option. If a pull-high option is not used then the pin should be tied to ground.
Question 5
When in HALT mode why does the device continue to consume power?
Answer
When the MCU enters the HALT mode the oscillator is stopped. However if the WDT oscillator (if WDT is enabled in the options) or if the RTC oscillator is still running then some power will be consumed. In addition, the I/Os will maintain the condition they were in when the HALT instruction was executed. It is important to check if the I/Os inputs are floating or outputs remain loaded in the HALT mode that they might consume power.
Question 6
Why, when PA (and PC0~PC3 for HT82K68A/HT82K68E) is low the device cannot wake up?
Answer
The PA port (and PC0~PC3 for HT82K68A/HT82K68E) pins can all be configured to wake up the device but are activated only on a low going edge. If the corresponding PA pin was low when the HALT instruction was executed then the low logic state of this pin will have no wake up effect as no low going transition exists.
Question 7
Why, when a low going edge is presented on the external interrupt pin the MCU does not wake-up?
Answer
Although the MCU can be woken up by an external interrupt, the actual wake process takes place only when the Interrupt Request Flag EIF changes from "0" to "1". If when the MCU enters a HALT condition the EIF flag is already set to "1", then a further interrupt will have no effect on the status of the EIF flag, which will remain in its present "1" condition. As a transition a wake-up will not occur.
Question 8
Is it possible to disable the wake-up function of the external interrupt?
Answer
If before entering a HALT condition the EMI is first cleared and then if the EIF bit is set to "1" the external interrupt will have no wake-up function.
Question 9
What is the constraints on VDD during Power On?
Answer
To ensure the Power On Reset operates successfully, the VDD rising voltage is recommended to be completed within 20ms. For battery applications, the internal resistance will increase due to the low battery condition and will slow the rising edge of the power supply increasing the possibility of Power On Reset failures.
Question 10
When use HT82K68A/HT82K68E I/O pin, are there any special points to note?
Answer
-
PC0 and PC1 are designed dedicated for PS2 mode. The resistance value of pull-high option is 4.7 Kohm (while 12 Kohm for other I/O lines), and when switch to output mode, PC0 and PC1 are configured as open drain
(NMOS output).
-
PE2 ~ PE4 are open drain (NMOS output). These 3 pins are designed to drive
LEDs, the sink capability is smaller thus the
external current limit resistor can be omitted
-
PC2 is pin-shared with external interrupt. By setting PE0 to 1 or 0, user can select the rising or falling edge for interrupt triggering.
Question 11
How is the HT82K96A/HT82K96E ADC setup?
Answer
To setup the ADC, the following process should be followed:
-
Select a certain channel
(ACS2、ACS1、ACS0)
-
Select the ADC sampling clock source (ADCS1, ADCS0)
-
Enable the ADC by setting the ADON bit =1
-
Start the A/D conversion (0 --> 1 --> 0) , busy state is indicated by
EOCB=1
-
Wait for 76 TAD clocks, and the A/D conversion is completed
(EOCB=0).
-
Read the conversion data from ADR
Question 12
How to read/write the control endpoint or interrupt endpoints data?
Answer
User can select which FIFO data to read/write by setting the USB register MISC (46H), and check the Ready bit in the MISC, if ready, read the data through the FIFO pointer Register (FIFO0~FIFO3).
Question 13
How to read the FIFO data ?
Answer
HT82K96A/HT82K96E FIFO is read by Packet. To read from the FIFO, the following process should be followed:
-
Select one set of FIFO, set in the read mode
(MISC TX bit = 0), and set the REQ bit to "1".
-
Check the ready bit till the status = 1
-
Read through the FIFO pointer register, and record the data number that has been read.
-
Repeat the step 2 and 3 untill the ready bit becomes 0 which indicates the end of the FIFO data reading.
-
Set MISC TX bit=1
-
Clear the REQ bit to 0. Complete reading.
User reads the data through the FIFO pointer register, user has to record the number of bytes to be read. HT82K96A/HT82K96E allows a maximum of 8 bytes of data in each packet.
Question 14
How do I know the FIFO data is zero length handshake?
Answer
If the PC sends the zero length handshake data to HT82K96A/HT82K96E, the LEN0 bit of the MISC register will be set to 1 for indication. However the status bit will not be cleared automatically, this bit has to be cleared by user.
Question 15
How do I write FIFO data?
Answer
HT82K96A/HT82K96E FIFO is written by Packet. To write to the FIFO, the following process should be followed:
-
Select a set of FIFO, set in the write mode
(MISC TX bit = 1), and set the REQ bit to "1"
-
Check the ready bit till the status = 1
-
Write through the FIFO pointer register and take down the data number that has been written
-
Repeat the step 2 and 3 till the writing is complete or the ready bit becomes 0 which indicates the FIFO no longer allows any data writing.
-
Set MISC TX bit= 0
-
Clear the REQ bit to 0. Complete writing.
User writes the data through the FIFO pointer register, user has to record the number of bytes that have written. HT82K96A/HT82K96E allows a maximum of 8 bytes of data in each packet.
Question 16
How to generate a zero length handshake data?
Answer
To write a Zero length Handshake data, the following process should be followed:
-
Select the first set of the FIFO, set MISC TX bit to 1, and set REQ bit to 1
-
Check till the ready bit status =1
-
Set MISC TX bit= 0
-
Clear the REQ bit to 0. Complete writing.
Question 17
How do I set the FIFO as input or output?
Answer
By the Tx bit of MISC bit; Tx bit=1 for output, and Tx bit=0 for Input. For detailed spec. please check Holtek data sheet.
Question 18
How do I match the FIFO pointer register with an endpoints?
Answer
HT82K96A/HT82K96E has four built-in FIFO matching four endpoints. If you read the data through FIFO0 pointer register, it will be transferred by the endpoint 0. With the same rule, if being read by FIFO1 pointer register, it will be transferred by the endpoint 1. Being read by the FIFO2 pointer register, it will be transferred by the endpoint 2. Being read by the FIFO3 pointer register, it will be transferred by the Endpoint 3.
Question 19
How do I know if there's a USB signal?
Answer
HT82K96A/HT82K96E has built-in USB internal Interrupt (vector 04H). Once HT82K96A/HT82K96E detects a valid USB signal, will generate a USB Interrupt, user can check the USC register to see what USB signal is received. For further information please check Holtek data sheet.
Question 20
How do I know if it's the USB Suspend signal?
Answer
If there's a USB Suspend signal, the USB Interrupt will be triggered and the USC Register SUSP bit will be set to "1." For further information please check Holtek data sheet.
Question 21
How do I know if it's the USB Resume signal?
Answer
If there's a USB Resume signal, the USB Interrupt will be triggered and the USC Register both SUSP and RESUME bit will be set to "1". For further information please check Holtek data sheet.
Question 22
How do I know if it's the USB Read/Write Endpoint?
Answer
If there's a USB Suspend signal, the USB Interrupt will be triggered and the USC Register SUSP bit will be set to "0" and the Endpoint Request flag (EP0IF, EP1IF, EP2IF, EP3IF) corresponding to the USR Register will be set. For further information please check Holtek data sheet.
Question 23
How do I know if it's the USB Pre-Reset?
Answer
If there's a USB Pre-Reset signal, the USB Interrupt will be triggered and the USC Register SUSP bit will be set to 0.
Question 24
How the current in the USB Suspend mode can be less than 500 A ?
Answer
To meet the 500 uA specification, user must clear the USBCKEN (SCC.3=0) before entering the PC Suspend mode and no input pins are left floating. After PC Wakeup, remember to set the USBCKEN (SCC.3=1) to ensure the HT82K96A/HT82K96E USB SIE working normally. For further information please check Holtek data sheet.
Question 25
How do I ensure HT82K96A/HT82K96E USB SIE working normally?
Answer
To meet the spec. of the USB suspend mode current to be less than 500uA, user will set USBCKEN bit to 0 in the suspend mode, and the USB SIE clock will stop. To ensure the USB SIE still function normally after the device Wakeup. If the USC register SUSP bit=0 in the USB Interrupt Subroutine or in the RESUME mode (USC Register Resume bit=1), the USBCKEN bit of the SCC Register must be set to 1.
Question 26
How do I set the mode to USB or PS/2?
Answer
You can set the HT82K96A/HT82K96E in USB or PS/2 mode by the
USR Register SPS2 and SUSB bit. SPS2=1, SUSB=0 for PS2 mode.
SPS2=0, SUSB=1 for USB mode.
Question 27
Can user read the D+ and D- signals in the USB mode?
Answer
In the USB mode, user can read the D+ and D- signals by the
PS2DAI and PS2CKI bit of the USC Register. However writing to
PS2DAO and PS2CKO is invalid.
Question 28
How can user write the CLK, DATA signals in the PS/2 mode?
Answer
In the PS/2 mode, user can read the CLK, DATA signals through
the PS2DAI and PS2CKI bit of the USC Register and also write CLK,
DATA signal to PS2DAO and PS2CKO.
Question 29
If the RC oscillator is selected as the system clock, what are the purposes of the external resistor and capacitor? Can the capacitor be omitted?
Answer
The external resistor on the OSC1 pin is used to generate bias to control the internal RC charge and discharge. The frequency of the RC oscillator is determined by the value of this external resistor. The recommended 470pF external capacitor, which is connected to the OSC1 pin, is added to avoid cross-talk to the OSC2 line. The OSC2 pin is provided to supply an output frequency of 1/4 system frequency. However, if this 1/4 system frequency output, OSC2, is not utilized, the external capacitor on OSC1 pin can be omitted.
Question 30
When using a 3-pin resonator/crystal in my MCU application can the
capacitor be connected to VDD instead of VSS?
Answer
When using 3-pin resonator/crystals, for reasons of layout
convenience, the capacitor can be connected to VDD instead of VSS.
Question 31
When writing my program, if I want to create a Table in Program
Memory, how do I start my table at a specific address? If the ORG
statement is not suitable are their other methods of
implementation?
Answer
When using the ORG expression, this can only be used to
indicate the offset from the start address of the present section.
To overcome this problem the SECTION directive can be used to
establish a table at any specific address, for example:
table .section at 300 'code'
This statement can be used to indicate the specific address
where the table should begin.
Question 32
The HT82K96A/E has 4 endpoints, can they all be used?
Answer
Yes this is possible. In the USB specification, for low speed
applications, in addition to endpoint0 only 2 other endpoints can
be used in one function, but a device can be used with multiple
functions. These 2 endpoints are unidirectional, and can be
defined at any point.
Question 33
In the HT82K94E/HT82K94A, there is a directly addressable TBHP register, how is it used?
Answer
The TBHP register is used by the MCU to read table data located within its Program Memory. Its function can be enabled or disabled using a configuration option. If the TBHP function is disabled, then when using the“TABRDC(M)”and“TABRDL(M)”instructions to read a table, it is only necessary to place a value into the TBLP register. Any value placed into the TBHP register will have no effect. If the TBHP function is enabled, then before using the “TABRDC(M)”instruction, it is also necessary to place a value into the TBHP register. When using the“TABRDL(M)”instruction, TBHP will be seen as the last page.
The following example depicts this operation:
# INCLUDE HT82K94E.INC
CODE.SECTION‘CODE‘
…
MOV A, 05H
MOV TBHP, A
MOV A, 60H
MOV TBLP, A
TABRDC R_Buf0
MOV A, TBLH
MOV R_Buf1, A
…
ORG 0060H
DC 1122H, 3344H
ORG 0560H
DC 5566H, 7788H
Executing the“TABRDC R_Buf0”instruction located in the first page of the Program Memory will give the following result:
If TBHP is disabled, then the value obtained from reading the table will be:
R_Buf0=22H,R_Buf1=11H,
If TBHP is enabled, then the value obtained from reading the table will be: R_Buf0=66H,R_Buf1=55H
Points to Note
Question 1
What are the OTP dice programming steps for COB form?
Answer
-
Bond the dice to the COB
-
Program the dice on the COB
-
Conduct a COB functional test
-
Encapsulate the COB and afterwards solder the other devices
Question 2
I want to produce my products with an OTP dice form on board, how
do I program those OTP dice devices?
Answer
To program OTP devices, 11 pins are required and they should be
reserved on the PCB. Please check your local agent for detailed
information of those pins. Users should prepare the connecting
cable from those 11 pins to the 40-pin TEXTOOL on the programmer
and then follow the standard programming procedure to burn the
device on the PCB. Note that the tracks of those 11 pins on the
PCB should be as short as possible and among them the PA0~PA6
should avoid connections to the outputs of other devices. If this
situation cannot be avoided, a 1K ohm resistor in series with each
line is recommended. In addition, the cable from the PCB to the
programmer should be less than 15 cm.
Question 3
What could be the reasons for low yield programming of OTP DICE
devices?
Answer
Firstly, you should exclude bonding failure possibilities, as
these are the major reasons for poor programming yield. If you are
not sure whether there is a bonding issue, you may get assistance
from our technical support personnel by sending us the
decapsulated samples.
Question 4
When I use the HT-Writer to program the OTP Dice, an "MCU:
Cannot identify" message will pop up. Is this a bonding
problem or an OTP defect?
Answer
For the package form of OTP devices, its product ID will be burnt
into the device which can be used to display the device
information in the message window, however, if the product ID code
is missing, a warning message will pop up. This is usually the
case for dice form OTP devices which have no product ID. To
disable this warning function, deselect the Check ID option under
the Options menu. If the HT-Writer is to be used in stand-alone
mode, set the switch DIP1, which is located on the back of the
HT-Writer to the OFF position.
Question 5
What precautions should I take in designing the MCU Reset and
Oscillator circuit?
Answer
Please refer to the "HA0075E"
in the Application Notes
section of our company web site.
Others
Question 1
What are the ESD and Latch up features of the HT82
Keyboard/Mouse MCUs?
Answer
As the HT82 Keyboard/Mouse type series of MCUs possess
exceptional ESD and Latch up protection they are suitable for
industrial use. In the area of ESD protection the devices conform
to the US military spec MIL-STD-883E 3015.7 and each I/O can
withstand in excess of 5KV of body static. Regarding latch-up, the
devices conform to the JEDEC-NO.17 specification, when tested in
current mode, each I/O can withstand in excess of 100mA.
Question 2
Are the HT82 Keyboard/Mouse MCUs available in Dice form?
Answer
Holtek provides a service to supply customers with high volume
requirements for Dice Form MCUs for HT82K68A/HT82K68E MCUs. It is
important that customers take note of the special requirements of
dice form devices for bonding and OTP programming.
Question 3
What kind of the USB signals will trigger the USB Interrupt?
Answer
The following USB signals will trigger a USB Interrupt:
-
USB Suspend
-
USB Resume
-
USB Pre-Reset
-
USB Read/Write Endpoint
Question 4
What is the system frequency tolerance if an RC oscillator is used as the system clock?
Answer
If the RC oscillator is selected, due to tolerances in the device processing, a nominal
±20% frequency tolerance from lot to lot is expected. Assuming that the external resistor has a
±5% tolerance, then the overall frequency tolerance would be ±25%.
The above specified tolerance is provided as a reference only and is not guaranteed. For applications where a more precise frequency source is required it is recommended that either a resonator or crystal frequency source is used.
Question 5
When using the MACRO assembly directive can I save Program Memory
space? Also does it affect the MCU execution speed?
Answer
After the assembly process, all of the instructions belonging
to the MACRO will be written into Program Memory area, therefore
there is no influence on either the Program Memory space or on the
speed of execution. However as the code has been simplified
program maintenance will be easier.
|