Part Number Hot Search : 
MCJ16 3DD1300 AD1362 CHEMB6PT HEM385A OAP310 MAX85 LF200
Product Description
Full Text Search
 

To Download HT48CA0-3 Datasheet File

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


  Datasheet File OCR Text:
  ht48ra0-3/HT48CA0-3 remote type 8-bit mcu rev.1.10 1 october 12, 2007 features  operating voltage: f sys =4mhz(  3%) at 2.0v~3.6v, temperature = 0  c ~ +50  c  10 bidirectional i/o lines  6 schmitt trigger input lines (pb7 without pull-high resistor)  one programmable carrier output - using 9-bit timer  on-chip rc oscillator - 4mhz  3% when v dd =2.0v~3.6v; temperature = 0  c ~ +50  c  watchdog timer  1k  14 program memory  32  8 data ram  power-down and wake-up features reduce power consumption  62 powerful instructions  up to 1  s instruction cycle with 4mhz system clock  all instructions executed in 1 or 2 machine cycles  14-bit table read instructions  one-level subroutine nesting  bit manipulation instructions  low voltage reset function  20-pin sop/ssop package general description the ht48ra0-3/HT48CA0-3 are 8-bit high perfor- mance, risc architecture microcontroller devices spe- cifically designed for multiple i/o control product applications. the mask version HT48CA0-3 is fully pin and functionally compatible with the otp version ht48ra0-3 device. the advantages of low power consumption, i/o flexibil- ity, timer functions, watchdog timer, halt and wake-up functions, as well as low cost, enhance the versatility of this device to suit a wide range of application possibili - ties such as industrial control, consumer products, and particularly suitable for use in products such as infrared remote controllers and various subsystem controllers. technical document  tools information  faqs  application note  ha0016e writing and reading to the ht24 eeprom with the ht48 mcu series  ha0018e controlling the ht1621 lcd controller with the ht48 mcu series  ha0041e using the ht48ca0 to generate the ht6221 output signals  ha0075e mcu reset and oscillator circuits application note  ha0076e ht48rax/ht48cax software application note  ha0082e ht48xa0-1 and ht48xa0-2 power-on reset timing
block diagram pin assignment ht48ra0-3/HT48CA0-3 rev.1.10 2 october 12, 2007                            
  
         
     










       
       
            
                                !  "     "         !  "     !  #   $ "  "   %           
         & '  & '   $       (  ) &  * " +     $  $ &         $ ,    -       -    $   .    $ ,  - 
 / 0 "  , $ "        "   %         1  $ 2   3    ! (  " 4 " #   +  5  6 
pin description pin name i/o configuration option description pa0~pa7 i/o  bidirectional 8-bit input/output port with pull-high resistors. software instructions determine if the pin is an nmos output or schmitt trigger input. pb0, pb1 i/o wake-up bidirectional 2-bit input/output lines with pull-high resistors. each individual bit can be configured as a wake-up input by a configuration option. software in - structions determine if the pin is an nmos output or schmitt trigger input. pb2~pb6 i wake-up 5-bit schmitt trigger input lines with pull-high resistors. each individual bit can be configured as a wake-up input by a configuration option. pb7 i wake-up 1-bit schmitt trigger input lines without pull-high resistor. this bit can be config - ured as a wake-up input by a configuration option. rem o  carrier output pin. osc1 i  osc1 is connected to an external resistor for the internal system clock. vdd  positive power supply vss   negative power supply, ground absolute maximum ratings supply voltage ...........................v ss  0.3v to v ss +4.0v storage temperature ............................  50  cto125  c input voltage..............................v ss  0.3v to v dd +0.3v operating temperature...........................  40  cto85  c i ol total ..............................................................150ma i oh total............................................................  100ma total power dissipation .....................................500mw note: these are stress ratings only. stresses exceeding the range specified under  absolute maximum ratings  may cause substantial damage to the device. functional operation of this device at other conditions beyond those listed in the specification is not implied and prolonged exposure to extreme conditions may affect device reliability. d.c. characteristics ta=25  c symbol parameter test conditions min. typ. max. unit v dd conditions v dd operating voltage  2.0  3.6 v i dd operating current 3v no load, f sys =4mhz  0.7 1.5 ma i stb standby current 3v no load, system halt  1  a v il input low voltage for i/o ports 3v  0  0.2v dd v v ih input high voltage for i/o ports 3v  0.8v dd  v dd v v lvr low voltage reset voltage  1.8 1.9 2.0 v i ol i/o ports sink current 3v v ol =0.1v dd 48  ma i oh rem output source current 3v v oh =0.9v dd  5  7  ma r ph pull-high resistance 3v  100 150 200 k v por v dd start voltage to ensure power-on reset   100 mv r por v dd rise rate to ensure power-on reset  0.035  v/ms ht48ra0-3/HT48CA0-3 rev.1.10 3 october 12, 2007
a.c. characteristics ta=25  c symbol parameter test conditions min. typ. max. unit v dd conditions f sys system clock 3v f sys =4mhz(  3%) , temp. = 0  c ~ +50  c 3880 4000 4120 khz t sst system start-up timer period  power-up, reset or wake-up from halt  1024  t sys t lvr low voltage width to reset  0.25 1 2 ms t por power-on reset low pulse width  1  s note: t sys =1/f sys ht48ra0-3/HT48CA0-3 rev.1.10 4 october 12, 2007 functional description execution flow the ht48ra0-3/HT48CA0-3 system clock is an rc type clock which requires the connection of an external resistor for its operation. it is internally divided into four non-overlapping clocks. one instruction cycle consists of four system clock cycles. instruction fetching and execution are pipelined in such a way that a fetch takes one instruction cycle while de - coding and execution takes the next instruction cycle. however, the pipelining scheme causes each instruc- tion to effectively execute within one cycle. if an instruc- tion changes the program counter, two cycles are required to complete the instruction. program counter  pc the 10-bit program counter (pc) controls the sequence in which the instructions stored in program memory are executed and its contents specify a maximum of 1024 addresses. after accessing a program memory word to fetch an in - struction code, the contents of the program counter are incremented by one. the program counter then points to the memory word containing the next instruction code. when executing a jump instruction, conditional skip ex- ecution, loading pcl register, subroutine call, initial re- set or return from subroutine, the pc manipulates the program transfer by loading the address corresponding to each instruction. $
$  $  $  $
$  $  $  $
$  $  $  2   ! * ,  7  $ , 8   9 :  !    ,  7  $ , 8   /
9 2   ! * ,  7  $ , 8   ;
9 :  !    ,  7  $ , 8   9 2   ! * ,  7  $ , 8   ;  9 :  !    ,  7  $ , 8   ;
9     ;
  ;   (    ,  <  ! =      !  "   ,  ( ! <    execution flow mode program counter *9 *8 *7 *6 *5 *4 *3 *2 *1 *0 initial reset 0000000000 skip program counter + 2 loading pcl *9 *8 @7 @6 @5 @4 @3 @2 @1 @0 jump, call branch #9 #8 #7 #6 #5 #4 #3 #2 #1 #0 return from subroutine s9 s8 s7 s6 s5 s4 s3 s2 s1 s0 program counter note: *9~*0: program counter bits s9~s0: stack register bits #9~#0: instruction code bits @7~@0: pcl bits
ht48ra0-3/HT48CA0-3 rev.1.10 5 october 12, 2007 the conditional skip is activated by instruction. once the condition is met, the next instruction, fetched during the current instruction execution, is discarded and a dummy cycle replaces it to get the proper instruction. otherwise proceed with the next instruction. the lower byte of the program counter (pcl) is a read - able and writeable register (06h). moving data into the pcl performs a short jump. the destination will be within 256 locations. when a control transfer takes place, an additional dummy cycle is required. program memory  rom the program memory is used to store the program in - structions which are to be executed. it also contains data and table and is organized into 1024  14 bits, ad - dressed by the program counter and table pointer. certain locations in the program memory are reserved for special usage:  location 000h this area is reserved for the initialization program. af - ter a device reset, the program always begins execu - tion at location 000h.  table location any location in the program memory space can be used as a look-up table. the instructions tabrdc [m] (the current page, one page=256 words) and tabrdl [m] (the last page) transfer the contents of the lower-order byte to the specified data memory register, and the higher-order byte to tblh (08h). only the destination of the lower-order byte in the ta- ble is well-defined, the other bits of the table word are transferred to the lower portion of tblh, the remain - ing 2 bits are read as  0  . the table higher-order byte register (tblh) is read only. the table pointer (tblp) is a read/write register (07h), where p indicates the table location. before accessing the table, the location must be placed in tblp. the tblh is read only and cannot be restored. all table related instructions need 2 cycles to complete the operation. these areas may function as normal program memory depending upon the requirements. stack register  stack this is a special part of the memory used to save the contents of the program counter only. the stack is orga - nized into one level and is neither part of the data nor part of the program space, and is neither readable nor writeable. the activated level is indexed by the stack pointer and is neither readable nor writeable. at a sub - routine call the contents of the program counter are pushed onto the stack. at the end of a subroutine sig - naled by a return instruction, ret, the program counter is restored to its previous value from the stack. after a chip reset, the sp will point to the top of the stack. if the stack is full and a  call  is subsequently exe - cuted, stack overflow occurs and the first entry will be lost and only the most recent return address is stored. data memory  ram the data memory is divided into two functional groups: special function registers and general purpose data memory (32  8). most are read/write, but some are read only. the remaining space before the 20h is reserved for fu- ture expanded usage and reading these locations will return the result 00h. the general purpose data mem - ory, addressed from 20h to 3fh, is used for data and control information under instruction command. all data memory areas can handle arithmetic, logic, increment, decrement and rotate operations directly. except for some dedicated bits, each bit in the data memory can be set and reset by the set [m].i and clr [m].i instructions, respec - tively. they are also indirectly accessible through memory pointer register (mp;01h). >   4 " !  , "  "  "  < " ?   "   , @             
 , 0 "  )   = /  @ ,   0 <  , 8    , a   # 9  > )   = /  @ ,   0 <  , 8    , a   # 9  2 2 >  2 2 > program memory instruction(s) table location *9 *8 *7 *6 *5 *4 *3 *2 *1 *0 tabrdc [m] p9 p8 @7 @6 @5 @4 @3 @2 @1 @0 tabrdl [m] 1 1 @7 @6 @5 @4 @3 @2 @1 @0 table location note: *9~*0: table location bits @7~@0: table pointer bits p9~p8: current program counter bits
ht48ra0-3/HT48CA0-3 rev.1.10 6 october 12, 2007 indirect addressing register location 00h is an indirect addressing register that is not physically implemented. any read/write operation to [00h] accesses the data memory pointed to by mp (01h). reading location 00h itself indirectly will return the result 00h. writing indirectly results in no operation. the memory pointer register mp (01h) is a 7-bit register. bit 7 of mp is undefined and reading will return the result  1  . any writing operation to mp will only transfer the lower 7-bits of data to mp. accumulator the accumulator closely relates to alu operations. it is also mapped to location 05h of the data memory and is capable of carrying out immediate data operations. data movement between two data memory locations has to pass through the accumulator. arithmetic and logic unit  alu this circuit performs 8-bit arithmetic and logic operation. the alu provides the following functions.  arithmetic operations (add, adc, sub, sbc, daa)  logic operations (and, or, xor, cpl)  rotation (rl, rr, rlc, rrc)  increment and decrement (inc, dec)  branch decision (sz, snz, siz, sdz ....) the alu not only saves the results of a data operation but also changes the contents of the status register. status register  status this 8-bit status register (0ah) contains the zero flag (z), carry flag (c), auxiliary carry flag (ac), overflow flag (ov), power down flag (pdf) and watchdog time-out flag (to). it also records the status information and con - trols the operation sequence.  @  ! "  < ,    @       ,      (          ) $ )  $ ) >  $  $ &     $  $ 
  )   )
  >   >
%      < ,    @       ,      ( 8   , (   9 b , &    #   # ,  , c c  > >
>  >  >  >  >  >  >  >  >  > >  >  > > 2 >
>

>
 >
 >
 >
 >
 >
 >
 >
 >
 >
>
 >
 >
>
2 >  2 > ram mapping bit no. label function 0c c is set if the operation results in a carry during an addition operation or if a borrow does not take place during a subtraction operation; otherwise c is cleared. c is also affected by a ro - tate through carry instruction. 1ac ac is set if the operation results in a carry out of the low nibbles in addition or no borrow from the high nibble into the low nibble in subtraction; otherwise ac is cleared. 2 z z is set if the result of an arithmetic or logic operation is zero; otherwise z is cleared. 3ov ov is set if the operation results in a carry into the highest-order bit but not a carry out of the highest-order bit, or vice versa; otherwise ov is cleared. 4 pdf pdf is cleared when either a system power-up or executing the clr wdt instruction. pdf is set by executing the halt instruction. 5to to is cleared by a system power-up or executing the clr wdt or halt instruction. to is set by a wdt time-out. 6~7  unused bit, read as  0  status (0ah) register
ht48ra0-3/HT48CA0-3 rev.1.10 7 october 12, 2007 with the exception of the to and pdf flags, the other status register bits can be altered by instructions like most other register. any data written into the status regis - ter will not change the to or pdf flags. in addition it should be noted that operations related to the status reg - ister may give different results from those intended. the to and pdf flags can only be changed by the watchdog timer overflow, device power-up, clearing the watchdog timer and executing the halt instruction. the z, ov, ac and c flags generally reflect the status of the latest operations. in addition, on executing a subroutine call, the status register will not be automatically pushed onto the stack. if the contents of the status are important and if the sub - routine can corrupt the status register, precautions must be taken to save it properly. oscillator configuration only an external rc oscillator type is supported for the ht48ra0-3/HT48CA0-3. an external resistor between osc1 and vss in needed whose resistance must be 12k for a 4mhz frequency. the rc oscillator provides  3% accuracy, the condi- tions are:  v dd = 2.0v ~ 3.6v  temperature = 0  c ~ +50  c  f sys = 4mhz watchdog timer  wdt the wdt clock source is implemented by the instruction clock which is the system clock divided by 4. the clock source is processed by a frequency divider and a prescaler to provide various time out periods. wdt time out period = clock source 2 n where n= 8~11 selected by a configuration option. the wdt timer is designed to prevent a software mal - function or sequence jumping to an unknown location with unpredictable results. the watchdog timer can be disabled by configuration option. if the watchdog timer is disabled, all the executions related to the wdt result in no operation and the wdt will lose its protection pur - pose. in this situation the logic can only be restarted by external logic. a wdt overflow under normal operation will initialise a  chip reset  and set the status bit  to  . to clear the con - tents of the wdt prescaler, two methods are adopted, software instructions or a halt instruction. there are two types of software instructions. one type is the single in - struction  clr wdt  , the other type comprises two in - structions,  clr wdt1  and  clr wdt2  . of these two types of instructions, only one can be active depending on the configuration option  clr wdt times selection op- tion  .ifthe  clr wdt  is selected (i.e.. clr wdt times equal one), any execution of the clr wdt instruction will clear the wdt. in case  clr wdt1  and  clr wdt2  are chosen (i.e.. clr wdt times equal two), these two in- structions must be executed to clear the wdt; otherwise, the wdt may reset the chip due to a time-out.  ,  ! " < <       

 =  system oscillator    <  ! = ,     !  8  (    ,  <  ! = 6  9  / 0 "  ,           !  < <   8  / 0 "  9 1  $ $ "   /      #  ,  @  "     <  !    #   @  "    <    , 1  $ 2   3    ! ( ,  " 4 " #    <  ! = ,     !  8  d  -

9 watchdog timer
ht48ra0-3/HT48CA0-3 rev.1.10 8 october 12, 2007 power down operation  halt the power-down mode is initialised by the halt in - struction and results in the following:  the system oscillator turns off and the wdt stops.  the contents of the on-chip data memory and regis - ters remain unchanged.  wdt prescaler is cleared.  all i/o ports maintain their original status.  the pdf flag is set and the to flag is cleared. the system can quit the halt mode by means of an ex - ternal falling edge signal on port b. by examining the to and pdf flags, the reason for chip reset can be deter - mined. the pdf flag is cleared when the system powers up or when a clr wdt instruction is executed and is set when the halt instruction is executed. the to flag is set if the wdt time-out occurs during normal operation. the port b wake-up can be considered as a continuation of normal execution. each bit in port b can be independ - ently selected to wake up the device by the code option. awakening from an i/o port stimulus, the program will resume execution of the next instruction. once a wake-up event(s) occurs, it takes 1024 t sys (system clock periods) to resume normal operation. in other words, a dummy cycle period will be inserted after the wake-up. to minimize power consumption, all i/o pins should be carefully managed before entering the halt status. reset there are three ways in which a reset can occur:  power on reset  low voltage reset  wdt time-out reset during normal operation some registers remain unchanged during reset condi - tions. most registers are reset to the  initial condition  when the reset conditions are met. by examining the pdf and to flags, the program can distinguish between different chip resets. to pdf reset conditions 0 0 power-on reset during power-up u u lvr reset during normal operation 1 u wdt time-out during normal operation note:  u  means unchanged. to guarantee that the system oscillator has started and stabilized, the sst (system start-up timer) provides an extra-delay of 1024 system clock pulses when the sys - tem powers up or when the system awakes from a halt state. when a system power up occurs, an sst delay is added during the reset period. any wake-up from halt will en - able the sst delay. the functional unit chip reset status is shown below. program counter 000h wdt prescaler clear input/output ports input mode stack pointer points to the top of the stack carrier output low level 1  $   < # ,    >  ) $   a   /   ,     !  "     $
/     " @ @ <  ,          
)  reset configuration   $    a   /   ,         $ , $ "   /           < , ,    reset timing chart
ht48ra0-3/HT48CA0-3 rev.1.10 9 october 12, 2007 input/output ports there are an 8-bit bidirectional input/output port, a 6-bit input with 2-bit i/o port in the ht48ra0-3/HT48CA0-3, labeled pa and pb which are mapped to [12h], [14h] of the data memory, respectively. each bit of pa can be se- lected as nmos output or schmitt trigger input with pull-high resistor by a software instruction. pb0~pb1 have the same structure as pa, while pb2~pb6 can only be used for input operation - schmitt trigger with pull-high resistors. pb7 is used for input operation - schmitt trigger but without pull-high resistor. when pa and pb are used for input operation, these ports are non-latched, that is, the inputs should be ready at the t2 rising edge of the instruction  mov a, [m]  (m=12h or 14h). for pa and pb0~pb1 output opera - tion, all data is latched and remains unchanged until the output latch is rewritten. when pa and pb0~pb1 is used for input operation, it should be noted that before reading data from the pads, a  1  should be written to the related bits to disable the nmos device. that is, the instruction  set [m].i  (i=0~7 for pa, i=0~1 for pb) is executed first to disable related nmos device, and then  mov a, [m]  to get stable data. after chip reset, pa and pb remain at a high level input line. each bit of pa and pb0~pb1 output latches can be set or cleared by the  set [m].i  and  clr [m].i  (m=12h or 14h) instructions respectively. some instructions first input data and then follow the output operations. for example,  set [m].i  ,  clr [m]  ,  cpl [m]  ,  cpla [m]  read the entire port states into the cpu, execute the defined operations (bit-operation), and then write the results back to the latches or to the accumulator. each line of pb has a wake-up capability selectable via a configuration option. the chip reset status of the registers is summarised in the following table: register power on low voltage reset wdt time-out (normal operation) program counter 000h 000h 000h mp -xxx xxxx -uuu uuuu -uuu uuuu acc xxxx xxxx uuuu uuuu uuuu uuuu tblp xxxx xxxx uuuu uuuu uuuu uuuu tblh --xx xxxx --uu uuuu --uu uuuu status --00 xxxx --uu uuuu --1u uuuu pa 1111 1111 1111 1111 1111 1111 pb 1111 1111 1111 1111 1111 1111 tsr0 0000 0000 0000 0000 0000 0000 tsr1 1000 0000 1000 0000 1000 0000 carl0 0000 0000 0000 0000 0000 0000 carl1 0000 0000 0000 0000 0000 0000 carh0 0000 0000 0000 0000 0000 0000 carh1 0000 0010 0000 0010 0000 0010 note:  u  means unchanged  x  means unknown  -  stands for unimplemented
ht48ra0-3/HT48CA0-3 rev.1.10 10 october 12, 2007   # ,          < < /  @   -       , 0   (    , 1  =  /  @   #  ,  @  "   pb2~pb6 input lines     ,    # ,        (    , 1  =  /  @   #  ,  @  "   pb7 input line timer the timer is an internal unit for creating a remote control transmission pattern. as shown, it consists of a 9-bit down counter (t8 to t0), a flag (t9) permitting the 1-bit timer output, and a zero detector. no. label function 0~7 t0~t7 down counter tsr0 (18h) register no. label function 0 t8 down counter 1t9 timer enable, initial value is  0  . 2~6  unused bit, read as  0  . 7 toef timer operation end flag, initial value is  1  . tsr1 (19h) register timer operation the timer starts counting down when a value other than  0  is set for the down counter with a timer manipulation instruction. the timer manipulation instructions for mak - ing the timer start operation are shown below: mov a,xxh ; xx = 00h ~ ffh mov tsr0,a mov a,xxh ; xx
01h, t8 mov tsr1,a set tsr1.1 ; the timer is started by set t9=1 addition notes for the 9-bit timer:  writing to tsr0 will only put the written data to the tsr0 register (t7~t0) and writing to tsr1 (t8) will transfer the specified data and contents of tsr0 to the down counter. toef will be cleared after the data transferred from tsr1 and tsr0 to the down coun - ter is completed and then wait until tsr1.1 is set by user.  setting tsr1.1=1, the timer will start counting. the timer will stop when its count is equal to  0  and then toef is set equal to  1  . e   .  e     , 0  1  "    * " @ ,      # ,     1   =   < < /  @   -     - 
    (    , 1  =  /  @   #  ,  @  "    - 
,   < ( pa, pb0~pb1 input/output lines
ht48ra0-3/HT48CA0-3 rev.1.10 11 october 12, 2007  if the tsr1.1 is cleared during the timer counting, the timer will be stopped. once the tsr1.1 is set (1 0 1), the down counter will reload data from t8~t0, and then the down counter begins counting down with the new load data.  if tsr1.1 and toef are equal to 1 both, the timer can re-start, after new data is written to tsr0, tsr1 (t0~t8) in sequence. note: if the contents of the down counter is 000h, set the t9 to start the timer counting, the timer will only count 1 step. the timer output time=64/f sys . [ (0+1)  64/f sys =64/f sys ] the down counter is decremented (  1) in the cycle of 64/f sys . if the value of the down counter becomes  0  , the zero detector generates the timer operation end sig - nal to stop the timer operation. at this time, toef will be set to  1  . the output of the timer operation end signal is continued while the down counter is  0  and the timer is stopped. the following relational expression applies be - tween the timer s output time and the down counter s set value. timer output time = (set value+1)  64/f sys an example is shown below. mov a,0ffh mov tsr0,a mov a,01h mov tsr1,a set tsr1.1 in the case above, the timer output time is as follows. (set value+1)  64/f sys = (511+1)  16  s = 8.192ms by setting the flag (t9) that enables the timer output to  1  , the timer can output its operation status from the rem pin. the rem pin can also output the carrier while the timer is in operation. note: the carrier output results if bit 9 of the high-level period setting modulo register (carh) is cleared (  0  ).                 
   a  ,        f , 8   -  9 ;
g    ,     !        "    (  ! *       "  !  "      "   ,  "    < +  5  6           <  ! = $  2   
  timer configuration   h
    $ "    ,    @   , $ "   b 8    , 4  <   ;
9 , : ,   6 +  5  timer output when carrier is not output
ht48ra0-3/HT48CA0-3 rev.1.10 12 october 12, 2007 carrier output  carrier output generator the carrier generator consists of a 9-bit counter and two modulo registers for setting the high-level and low-level peri - ods - carh and carl respectively. register bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 carl0 cl.7 cl. cl. cl. cl.3 cl.2 cl.1 cl.0 carl1  fix  0  cl.8 carh0 ch.7 ch.6 ch.5 ch.4 ch.3 ch.2 ch.1 ch.0 carh1  ch.9 (cary) ch.8 carl0 (1ah) register, carl1 (1bh), carh0 (1ch) register, carh1 (1dh), register note: 1. carh1.1 (cary) initial value is  1  . 2. carl1.2 (carh1.2)~carl1.7 (carh1.7) are unused bits, read as  0  . the carrier duty ratio and carrier frequency can be determined by setting the high-level and low-level widths using the respective modulo registers. each of these widths can be set in a range of 500ns to 64  satf sys = 4mhz. carh (carh1.0, carh0.7~carh0.0) and carl (carl1.0, carl0.7~carl0.0) are read and written using in - structions. example: mov a,xxh ; xxh = 00h~ffh mov carl0,a mov a,xxh ; xxh
01h, cl.8 (carl1.0) mov carl1,a mov a,xxh ; xxh = 00h~ffh mov carh0,a mov a,xxh ; xxh 02h, ch.8 (carh1.0) mov carh1,a clr carh1.1 ; the carrier is started by clearing cary(carh1.1)=  0    <  !       @       +  5    , 8 7    ,  9   )
  )  / 0 "  ,        +  5   ) h  8 9 7    ,
h  ) h   ) h   ) h   ) h   ) h   ) h   ) h   ) h
 ) h   #  <  ,    "    , +   ,    "   ,  *  , <  a / <  4  < , @   "  # 8   ) h  -   ) h 9   )   >
  >  > h    5  > h   > h   > h   > h   > h   > h   > h   > h
 > h   #  <  ,    "    , +   ,    "   ,  *  , * "  * / <  4  < , @   "  # 8   > h  -   > h 9   > 2 6 2     "    "    <    ! *  <    configuration of remote controller carrier generator note: 1. bit 9 of the modulo register for setting the low-level period (carl) is fixed to  0  . 2. t9: flag that enables timer output (timer block, see timer configuration)
ht48ra0-3/HT48CA0-3 rev.1.10 13 october 12, 2007 the values of carh and carl can be calculated from the following expressions. carl (carl1.0, carl0.7~carl0.0) = ( f sys  (1  d)  t)  1 carh (carh1.0, carh0.7~carh0.0) = ( f sys  d  t)  1 d: carrier duty ratio ( 0     "      , 7    $ "    ,    @   , $ "   b 8    , 4  <   ;
9 , : ,   6 +  5  timer output when carrier is an output note: when the carrier signal is active and during the time when the signal is high, if the timer output should go low, the carrier signal will first complete its high level period before going low.
ht48ra0-3/HT48CA0-3 rev.1.10 14 october 12, 2007 the output from the rem pin is as follows, in accordance with the values set to bit 9 (cary) of carh and the timer output enable flag (t9), and the value of the timer block s 9-bit down counter (t0 to t8). carh1.1 (cary) timer output enable flag (t9: tsr1.1) 9-bit down counter (tsr0.0~tsr0.7, tsr1.0) rem pin 00 0 low-level output 0 0 other than 0 0 1 0 64/fsys (with carrier output) 0 1 other than 0 carrier output (note) 10  low-level output 11  high-level output note: input values in the range of 001h to 1ffh to carh (carh1.0, carh0.7~carh0.0) and carl (carl1.0, carl0.7~carl0.0). caution: carh (carh1.0, carh0.7~carh0.0) and carl (carl1.0, carl0.7~carl0.0) must be set while the rem pin is low level (t 9=0ort0tot8=0). carh (carh1.0, carh0.7~carh0.0) carl (carl1.0, carl0.7~carl0.0) t h (  s) t l (  s) t(  s) f c (khz) duty 01h 01h 0.5 0.5 1.0 1000 1/2 03h 05h 1.0 1.5 2.5 400 2/5 09h 09h 2.5 2.5 5.0 200 1/2 13h 13h 5.0 5.0 10.0 100 1/2 20h 20h 8.25 8.25 16.5 60.6 1/2 21h 41h 8.25 16.75 25 40 1/3 22h 44h 8.75 17.25 26.0 38.5 1/3 22h 45h 8.75 17.5 26.25 38.10 1/3 22h 46h 8.8 17.6 26.4 37.9 1/3 23h 48h 9.0 18.25 27.25 36.7 1/3 24h 49h 9.26 18.52 27.78 36.0 1/3 34h 6ah 13.33 26.66 40.0 25 1/3 3bh 3bh 15.0 15.0 30.0 33.3 1/2 63h 63h 25.0 25.0 50.0 20 1/2 7fh 7fh 32.0 32.0 64.0 15.6 1/2 carrier frequency setting (f sys =4mhz)  )      "   ,  "    <  >
ht48ra0-3/HT48CA0-3 rev.1.10 15 october 12, 2007     h    )  h       ,  "    <    i
i  7     < ,  @     "      )  ,     !  ,   <     low voltage reset note:  *1  to make sure that the system oscillator has stabilised, the sst provides an extra delay of 1024 system clock pulses before entering normal operation.  *2  since low voltage has to be maintained in its original state and exceed 1ms, a 1ms delay enters the reset mode.  h  
h   h       )  low voltage reset  lvr the microcontroller provides a low voltage reset circuit in order to monitor the supply voltage of the device. if the supply voltage of the device is within the range 0.9v~v lvr , such as when changing a battery, the lvr will automatically reset the device internally. the lvr includes the following specifications:  the low voltage (0.9v~v lvr ) has to remain in this state for a time in excess of 1ms. if the low voltage state does not exceed 1ms, the lvr will ignore it and will not perform a reset function. the relationship between v dd and v lvr is shown below. configuration options the following table shows eight kinds of configuration options for the ht48ra0-3/HT48CA0-3. all the configuration op - tions must be defined to ensure proper system functioning. no. code option 1 wdt time-out period selection time-out period= 2 clock source n , where n=8~11. 2 wdt enable/disable selection. this option is to decide whether the wdt timer is enabled or disabled. 3 clr wdt times selection. this option defines how to clear the wdt by instruction.  one time  means that the clr wdt instruction can clear the wdt.  two times  means only if both of the clr wdt1 and clr wdt2 in - structions have been executed, the wdt can be cleared. 4 wake-up selection. this option defines the wake-up activity function. external input pins (pb only) all have the capability to wake-up the device. 5 lvr function: enable or disable
application circuits example ht48ra0-3/HT48CA0-3 rev.1.10 16 october 12, 2007                     
                              
       
                         
                                                             
         
                                
ht48ra0-3/HT48CA0-3 rev.1.10 17 october 12, 2007 instruction set introduction central to the successful operation of any microcontroller is its instruction set, which is a set of pro - gram instruction codes that directs the microcontroller to perform certain operations. in the case of holtek microcontrollers, a comprehensive and flexible set of over 60 instructions is provided to enable programmers to implement their application with the minimum of pro - gramming overheads. for easier understanding of the various instruction codes, they have been subdivided into several func - tional groupings. instruction timing most instructions are implemented within one instruc - tion cycle. the exceptions to this are branch, call, or ta - ble read instructions where two instruction cycles are required. one instruction cycle is equal to 4 system clock cycles, therefore in the case of an 8mhz system oscillator, most instructions would be implemented within 0.5  s and branch or call instructions would be im - plemented within 1  s. although instructions which re - quire one more cycle to implement are generally limited to the jmp, call, ret, reti and table read instruc- tions, it is important to realize that any other instructions which involve manipulation of the program counter low register or pcl will also take one more cycle to imple- ment. as instructions which change the contents of the pcl will imply a direct jump to that new address, one more cycle will be required. examples of such instruc- tions would be  clr pcl  or  mov pcl, a  . for the case of skip instructions, it must be noted that if the re- sult of the comparison involves a skip operation then this will also take one more cycle, if no skip is involved then only one cycle is required. moving and transferring data the transfer of data within the microcontroller program is one of the most frequently used operations. making use of three kinds of mov instructions, data can be transferred from registers to the accumulator and vice-versa as well as being able to move specific imme - diate data directly into the accumulator. one of the most important data transfer applications is to receive data from the input ports and transfer data to the output ports. arithmetic operations the ability to perform certain arithmetic operations and data manipulation is a necessary feature of most microcontroller applications. within the holtek microcontroller instruction set are a range of add and subtract instruction mnemonics to enable the necessary arithmetic to be carried out. care must be taken to en - sure correct handling of carry and borrow data when re - sults exceed 255 for addition and less than 0 for subtraction. the increment and decrement instructions inc, inca, dec and deca provide a simple means of increasing or decreasing by a value of one of the values in the destination specified. logical and rotate operations 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. in all logical data operations, the zero flag may be set if the result of the operation is zero. another form of logical data manipulation comes from the rotate instructions such as rr, rl, rrc and rlc which provide a simple means of rotating one bit right or left. different rotate instructions exist depending on pro - gram requirements. rotate instructions are useful for serial port programming applications where data can be rotated from an internal register into the carry bit from where it can be examined and the necessary serial bit set high or low. another application where rotate data operations are used is to implement multiplication and division calculations. branches and control transfer program branching takes the form of either jumps to specified locations using the jmp instruction or to a sub- routine using the call instruction. they differ in the sense that in the case of a subroutine call, the program must return to the instruction immediately when the sub - routine has been carried out. this is done by placing a return instruction ret in the subroutine which will cause the program to jump back to the address right after the call instruction. in the case of a jmp instruction, the program simply jumps to the desired location. there is no requirement to jump back to the original jumping off point as in the case of the call instruction. one special and extremely useful set of branch instructions are the conditional branches. here a decision is first made re - garding the condition of a certain data memory or indi - vidual bits. depending upon the conditions, the program will continue with the next instruction or skip over it and jump to the following instruction. these instructions are the key to decision making and branching within the pro - gram perhaps determined by the condition of certain in - put switches or by the condition of internal data bits.
ht48ra0-3/HT48CA0-3 rev.1.10 18 october 12, 2007 bit operations the ability to provide single bit operations on data mem - ory is an extremely flexible feature of all holtek microcontrollers. this feature is especially useful for output port bit programming where individual bits or port pins can be directly set high or low using either the  set [m].i  or  clr [m].i  instructions respectively. the fea - ture removes the need for programmers to first read the 8-bit output port, manipulate the input data to ensure that other bits are not changed and then output the port with the correct new data. this read-modify-write pro - cess is taken care of automatically when these bit oper - ation instructions are used. table read operations data storage is normally implemented by using regis - ters. however, when working with large amounts of fixed data, the volume involved often makes it inconve - nient to store the fixed data in the data memory. to over - come this problem, holtek microcontrollers allow an area of program memory to be setup as a table where data can be directly stored. a set of easy to use instruc - tions provides the means by which this fixed data can be referenced and retrieved from the program memory. other operations in addition to the above functional instructions, a range of other instructions also exist such as the  halt  in - struction for power-down operations and instructions to control the operation of the watchdog timer for reliable program operations under extreme electric or electro - magnetic environments. for their relevant operations, refer to the functional related sections. instruction set summary the following table depicts a summary of the instruction set categorised according to function and can be con - sulted as a basic instruction reference using the follow - ing listed conventions. table conventions: x: bits immediate data m: data memory address a: accumulator i: 0~7 number of bits addr: program memory address mnemonic description cycles flag affected arithmetic add a,[m] addm a,[m] add a,x adc a,[m] adcm a,[m] sub a,x sub a,[m] subm a,[m] sbc a,[m] sbcm a,[m] daa [m] add data memory to acc add acc to data memory add immediate data to acc add data memory to acc with carry add acc to data memory with carry subtract immediate data from the acc subtract data memory from acc subtract data memory from acc with result in data memory subtract data memory from acc with carry subtract data memory from acc with carry, result in data memory decimal adjust acc for addition with result in data memory 1 1 note 1 1 1 note 1 1 1 note 1 1 note 1 note z, c, ac, ov z, c, ac, ov z, c, ac, ov z, c, ac, ov z, c, ac, ov z, c, ac, ov z, c, ac, ov z, c, ac, ov z, c, ac, ov z, c, ac, ov c logic operation and a,[m] or a,[m] xor a,[m] andm a,[m] orm a,[m] xorm a,[m] and a,x or a,x xor a,x cpl [m] cpla [m] logical and data memory to acc logical or data memory to acc logical xor data memory to acc logical and acc to data memory logical or acc to data memory logical xor acc to data memory logical and immediate data to acc logical or immediate data to acc logical xor immediate data to acc complement data memory complement data memory with result in acc 1 1 1 1 note 1 note 1 note 1 1 1 1 note 1 z z z z z z z z z z z increment & decrement inca [m] inc [m] deca [m] dec [m] increment data memory with result in acc increment data memory decrement data memory with result in acc decrement data memory 1 1 note 1 1 note z z z z
ht48ra0-3/HT48CA0-3 rev.1.10 19 october 12, 2007 mnemonic description cycles flag affected rotate rra [m] rr [m] rrca [m] rrc [m] rla [m] rl [m] rlca [m] rlc [m] rotate data memory right with result in acc rotate data memory right rotate data memory right through carry with result in acc rotate data memory right through carry rotate data memory left with result in acc rotate data memory left rotate data memory left through carry with result in acc rotate data memory left through carry 1 1 note 1 1 note 1 1 note 1 1 note none none c c none none c c data move mov a,[m] mov [m],a mov a,x move data memory to acc move acc to data memory move immediate data to acc 1 1 note 1 none none none bit operation clr [m].i set [m].i clear bit of data memory set bit of data memory 1 note 1 note none none branch jmp addr sz [m] sza [m] sz [m].i snz [m].i siz [m] sdz [m] siza [m] sdza [m] call addr ret ret a,x reti jump unconditionally skip if data memory is zero skip if data memory is zero with data movement to acc skip if bit i of data memory is zero skip if bit i of data memory is not zero skip if increment data memory is zero skip if decrement data memory is zero skip if increment data memory is zero with result in acc skip if decrement data memory is zero with result in acc subroutine call return from subroutine return from subroutine and load immediate data to acc return from interrupt 2 1 note 1 note 1 note 1 note 1 note 1 note 1 note 1 note 2 2 2 2 none none none none none none none none none none none none none table read tabrdc [m] tabrdl [m] read table (current page) to tblh and data memory read table (last page) to tblh and data memory 2 note 2 note none none miscellaneous nop clr [m] set [m] clr wdt clr wdt1 clr wdt2 swap [m] swapa [m] halt no operation clear data memory set data memory clear watchdog timer pre-clear watchdog timer pre-clear watchdog timer swap nibbles of data memory swap nibbles of data memory with result in acc enter power down mode 1 1 note 1 note 1 1 1 1 note 1 1 none none none to, pdf to, pdf to, pdf none none to, pdf note: 1. for skip instructions, if the result of the comparison involves a skip then two cycles are required, if no skip takes place only one cycle is required. 2. any instruction which changes the contents of the pcl will also require 2 cycles for execution. 3. for the  clr wdt1  and  clr wdt2  instructions the to and pdf flags may be affected by the execution status. the to and pdf flags are cleared after both  clr wdt1  and  clr wdt2  instructions are consecutively executed. otherwise the to and pdf flags remain unchanged.
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. operation acc  acc+[m]+c affected flag(s) ov, z, ac, c adcm a,[m] add acc to data memory with carry description the contents of the specified data memory, accumulator and the carry flag are added. the result is stored in the specified data memory. operation [m]  acc+[m]+c affected flag(s) ov, z, ac, c add a,[m] add data memory to acc description the contents of the specified data memory and the accumulator are added. the result is stored in the accumulator. operation acc  acc + [m] affected flag(s) ov, z, ac, c add a,x add immediate data to acc description the contents of the accumulator and the specified immediate data are added. the result is stored in the accumulator. operation acc  acc+x affected flag(s) ov, z, ac, c addm a,[m] add acc to data memory description the contents of the specified data memory and the accumulator are added. the result is stored in the specified data memory. operation [m]  acc + [m] affected flag(s) ov, z, ac, c and a,[m] logical and data memory to acc description data in the accumulator and the specified data memory perform a bitwise logical and op - eration. the result is stored in the accumulator. operation acc  acc  and  [m] affected flag(s) z and a,x logical and immediate data to acc description data in the accumulator and the specified immediate data perform a bitwise logical and operation. the result is stored in the accumulator. operation acc  acc  and  x affected flag(s) z andm a,[m] logical and acc to data memory description data in the specified data memory and the accumulator perform a bitwise logical and op - eration. the result is stored in the data memory. operation [m]  acc  and  [m] affected flag(s) z ht48ra0-3/HT48CA0-3 rev.1.10 20 october 12, 2007
call addr subroutine call description unconditionally calls a subroutine at the specified address. the program counter then in - crements by 1 to obtain the address of the next instruction which is then pushed onto the stack. the specified address is then loaded and the program continues execution from this new address. as this instruction requires an additional operation, it is a two cycle instruc - tion. operation stack  program counter + 1 program counter  addr affected flag(s) none clr [m] clear data memory description each bit of the specified data memory is cleared to 0. operation [m]  00h affected flag(s) none clr [m].i clear bit of data memory description bit i of the specified data memory is cleared to 0. operation [m].i  0 affected flag(s) none clr wdt clear watchdog timer description the to, pdf flags and the wdt are all cleared. operation wdt cleared to  0 pdf  0 affected flag(s) to, pdf clr wdt1 pre-clear watchdog timer description the to, pdf flags and the wdt are all cleared. note that this instruction works in conjunc- tion with clr wdt2 and must be executed alternately with clr wdt2 to have effect. re- petitively executing this instruction without alternately executing clr wdt2 will have no effect. operation wdt cleared to  0 pdf  0 affected flag(s) to, pdf clr wdt2 pre-clear watchdog timer description the to, pdf flags and the wdt are all cleared. note that this instruction works in conjunc - tion with clr wdt1 and must be executed alternately with clr wdt1 to have effect. re - petitively executing this instruction without alternately executing clr wdt1 will have no effect. operation wdt cleared to  0 pdf  0 affected flag(s) to, pdf ht48ra0-3/HT48CA0-3 rev.1.10 21 october 12, 2007
cpl [m] complement data memory description each bit of the specified data memory is logically complemented (1 s complement). bits which previously containe d a 1 are changed to 0 and vice versa. operation [m]  [m] affected flag(s) z cpla [m] complement data memory with result in acc 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. the complemented result is stored in the accumulator and the contents of the data memory remain unchanged. operation acc  [m] affected flag(s) z daa [m] decimal-adjust acc for addition with result in data memory description convert the contents of the accumulator value to a bcd ( binary coded decimal) value re - sulting from the previous addition of two bcd variables. if the low nibble is greater than 9 or if ac flag is set, then a value of 6 will be added to the low nibble. otherwise the low nibble remains unchanged. if the high nibble is greater than 9 or if the c flag is set, then a value of 6 will be added to the high nibble. essentially, the decimal conversion is performed by add - ing 00h, 06h, 60h or 66h depending on the accumulator and flag conditions. only the c flag may be affected by this instruction which indicates that if the original bcd sum is greater than 100, it allows multiple precision decimal addition. operation [m]  acc + 00h or [m]  acc + 06h or [m]  acc + 60h or [m]  acc + 66h affected flag(s) c dec [m] decrement data memory description data in the specified data memory is decremented by 1. operation [m]  [m]  1 affected flag(s) z deca [m] decrement data memory with result in acc description data in the specified data memory is decremented by 1. the result is stored in the accu - mulator. the contents of the data memory remain unchanged. operation acc  [m]  1 affected flag(s) z halt enter power down mode description this instruction stops the program execution and turns off the system clock. the contents of the data memory and registers are retained. the wdt and prescaler are cleared. the power down flag pdf is set and the wdt time-out flag to is cleared. operation to  0 pdf  1 affected flag(s) to, pdf ht48ra0-3/HT48CA0-3 rev.1.10 22 october 12, 2007
inc [m] increment data memory description data in the specified data memory is incremented by 1. operation [m]  [m]+1 affected flag(s) z inca [m] increment data memory with result in acc description data in the specified data memory is incremented by 1. the result is stored in the accumu - lator. the contents of the data memory remain unchanged. operation acc  [m]+1 affected flag(s) z jmp addr jump unconditionally description the contents of the program counter are replaced with the specified address. program execution then continues from this new address. as this requires the insertion of a dummy instruction while the new address is loaded, it is a two cycle instruction. operation program counter  addr affected flag(s) none mov 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 mov a,x move immediate data to acc description the immediate data specified is loaded into the accumulator. operation acc  x affected flag(s) none mov [m],a move acc to data memory description the contents of the accumulator are copied to the specified data memory. operation [m]  acc affected flag(s) none nop no operation description no operation is performed. execution continues with the next instruction. operation no operation affected flag(s) none or a,[m] logical or data memory to acc description data in the accumulator and the specified data memory perform a bitwise logical or oper - ation. the result is stored in the accumulator. operation acc  acc  or  [m] affected flag(s) z ht48ra0-3/HT48CA0-3 rev.1.10 23 october 12, 2007
or a,x logical or immediate data to acc description data in the accumulator and the specified immediate data perform a bitwise logical or op - eration. the result is stored in the accumulator. operation acc  acc  or  x affected flag(s) z orm a,[m] logical or acc to data memory description data in the specified data memory and the accumulator perform a bitwise logical or oper - ation. the result is stored in the data memory. operation [m]  acc  or  [m] affected flag(s) z ret return from subroutine description the program counter is restored from the stack. program execution continues at the re - stored address. operation program counter  stack affected flag(s) none ret a,x return from subroutine and load immediate data to acc description the program counter is restored from the stack and the accumulator loaded with the specified immediate data. program execution continues at the restored address. operation program counter  stack acc  x affected flag(s) none reti return from interrupt description the program counter is restored from the stack and the interrupts are re-enabled by set- ting the emi bit. emi is the master interrupt global enable bit. if an interrupt was pending when the reti instruction is executed, the pending interrupt routine will be processed be- fore returning to the main program. operation program counter  stack emi  1 affected flag(s) none rl [m] rotate data memory left description the contents of the specified data memory are rotated left by 1 bit with bit 7 rotated into bit 0. operation [m].(i+1)  [m].i; (i = 0~6) [m].0  [m].7 affected flag(s) none 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 re - main unchanged. operation acc.(i+1)  [m].i; (i = 0~6) acc.0  [m].7 affected flag(s) none ht48ra0-3/HT48CA0-3 rev.1.10 24 october 12, 2007
rlc [m] rotate data memory left through carry description the contents of the specified data memory and the carry flag are rotated left by 1 bit. bit 7 replaces the carry bit and the original carry flag is rotated into bit 0. operation [m].(i+1)  [m].i; (i = 0~6) [m].0  c c  [m].7 affected flag(s) c rlca [m] rotate data memory left through carry with result in acc description data in the specified data memory and the carry flag are rotated left by 1 bit. bit 7 replaces the carry bit and the original carry flag is rotated into the bit 0. the rotated result is stored in the accumulator and the contents of the data memory remain unchanged. operation acc.(i+1)  [m].i; (i = 0~6) acc.0  c c  [m].7 affected flag(s) c rr [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  [m].0 affected flag(s) none rra [m] rotate data memory right with result in acc description data in the specified data memory and the carry flag are rotated right by 1 bit with bit 0 ro- tated into bit 7. the rotated result is stored in the accumulator and the contents of the data memory remain unchanged. operation acc.i  [m].(i+1); (i = 0~6) acc.7  [m].0 affected flag(s) none rrc [m] rotate data memory right through carry description the contents of 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. operation [m].i  [m].(i+1); (i = 0~6) [m].7  c c  [m].0 affected flag(s) c 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 re - places the carry bit and the original carry flag is rotated into bit 7. the rotated result is stored in the accumulator and the contents of the data memory remain unchanged. operation acc.i  [m].(i+1); (i = 0~6) acc.7  c c  [m].0 affected flag(s) c ht48ra0-3/HT48CA0-3 rev.1.10 25 october 12, 2007
sbc a,[m] subtract data memory from acc with carry description the contents of the specified data memory and the complement of the carry flag are sub - tracted from the accumulator. the result is stored in the accumulator. 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. operation acc  acc  [m]  c affected flag(s) ov, z, ac, c sbcm a,[m] subtract data memory from acc with carry and result in data memory description the contents of the specified data memory and the complement of the carry flag are sub - tracted from the accumulator. the result is stored in the data memory. note that if the re - sult 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. operation [m]  acc  [m]  c affected flag(s) ov, z, ac, c sdz [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 two cycle instruction. if the result is not 0 the program proceeds with the following instruction. operation [m]  [m]  1 skip if [m] = 0 affected flag(s) none sdza [m] skip if decrement data memory is zero with result in acc description the contents of the specified data memory are first decremented by 1. if the result is 0, the following instruction is skipped. the result is stored in the accumulator but the specified data memory contents remain unchanged. as this requires the insertion of a dummy in- struction while the next instruction is fetched, it is a two cycle instruction. if the result is not 0, the program proceeds with the following instruction. operation acc  [m]  1 skip if acc = 0 affected flag(s) none 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 [m].i set bit of data memory description bit i of the specified data memory is set to 1. operation [m].i  1 affected flag(s) none ht48ra0-3/HT48CA0-3 rev.1.10 26 october 12, 2007
siz [m] skip if increment data memory is 0 description the contents of the specified data memory are first incremented 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 two cycle instruction. if the result is not 0 the program proceeds with the following instruction. operation [m]  [m]+1 skip if [m] = 0 affected flag(s) none siza [m] skip if increment data memory is zero with result in acc description the contents of the specified data memory are first incremented by 1. if the result is 0, the following instruction is skipped. the result is stored in the accumulator but the specified data memory contents remain unchanged. as this requires the insertion of a dummy in - struction while the next instruction is fetched, it is a two cycle instruction. if the result is not 0 the program proceeds with the following instruction. operation acc  [m]+1 skip if acc = 0 affected flag(s) none snz [m].i skip if bit i of data memory is not 0 description if bit i of the specified data memory is not 0, the following instruction is skipped. as this re - quires the insertion of a dummy instruction while the next instruction is fetched, it is a two cycle instruction. if the result is 0 the program proceeds with the following instruction. operation skip if [m].i  0 affected flag(s) none sub a,[m] subtract data memory from acc description the specified data memory is subtracted from the contents of the accumulator. the result is stored in the accumulator. 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. operation acc  acc  [m] affected flag(s) ov, z, ac, c subm a,[m] subtract data memory from acc with result in data memory 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. operation [m]  acc  [m] affected flag(s) ov, z, ac, c sub a,x subtract immediate data from acc description the immediate data specified by the code is subtracted from the contents of the accumu - lator. the result is stored in the accumulator. note that if the result of subtraction is nega - tive, the c flag will be cleared to 0, otherwise if the result is positive or zero, the c flag will be set to 1. operation acc  acc  x affected flag(s) ov, z, ac, c ht48ra0-3/HT48CA0-3 rev.1.10 27 october 12, 2007
swap [m] swap nibbles of data memory description the low-order and high-order nibbles of the specified data memory are interchanged. operation [m].3~[m].0  [m].7 ~ [m].4 affected flag(s) none swapa [m] swap nibbles of data memory with result in acc description the low-order and high-order nibbles of the specified data memory are interchanged. the result is stored in the accumulator. the contents of the data memory remain unchanged. operation acc.3 ~ acc.0  [m].7 ~ [m].4 acc.7 ~ acc.4  [m].3 ~ [m].0 affected flag(s) none sz [m] skip if data memory is 0 description if the contents 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 two cycle instruction. if the result is not 0 the program proceeds with the following instruc - tion. operation skip if [m] = 0 affected flag(s) none sza [m] skip if data memory is 0 with data movement to acc description the contents of the specified data memory are copied to the accumulator. if the value is zero, the following instruction is skipped. as this requires the insertion of a dummy instruc - tion while the next instruction is fetched, it is a two cycle instruction. if the result is not 0 the program proceeds with the following instruction. operation acc  [m] skip if [m] = 0 affected flag(s) none sz [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 re- quires the insertion of a dummy instruction while the next instruction is fetched, it is a two cycle instruction. if the result is not 0, the program proceeds with the following instruction. operation skip if [m].i = 0 affected flag(s) none tabrdc [m] read table (current page) to tblh and data memory description the low byte of the program code (current page) addressed by the table pointer (tblp) is moved to the specified data memory and the high byte moved to tblh. operation [m]  program code (low byte) tblh  program code (high byte) affected flag(s) none tabrdl [m] read table (last page) to tblh and data memory description the low byte of the program code (last page) addressed by the table pointer (tblp) is moved to the specified data memory and the high byte moved to tblh. operation [m]  program code (low byte) tblh  program code (high byte) affected flag(s) none ht48ra0-3/HT48CA0-3 rev.1.10 28 october 12, 2007
xor a,[m] logical xor data memory to acc description data in the accumulator and the specified data memory perform a bitwise logical xor op - eration. the result is stored in the accumulator. operation acc  acc  xor  [m] affected flag(s) z xorm a,[m] logical xor acc to data memory description data in the specified data memory and the accumulator perform a bitwise logical xor op - eration. the result is stored in the data memory. operation [m]  acc  xor  [m] affected flag(s) z xor a,x logical xor immediate data to acc description data in the accumulator and the specified immediate data perform a bitwise logical xor operation. the result is stored in the accumulator. operation acc  acc  xor  x affected flag(s) z ht48ra0-3/HT48CA0-3 rev.1.10 29 october 12, 2007
package information 20-pin sop (300mil) outline dimensions symbol dimensions in mil min. nom. max. a 394  419 b 290  300 c14  20 c 490  510 d92  104 e  50  f4  g32  38 h4  12  0  10  ht48ra0-3/HT48CA0-3 rev.1.10 30 october 12, 2007 



   2  j % > 
20-pin ssop (150mil) outline dimensions symbol dimensions in mil min. nom. max. a 228  244 b 150  158 c8  12 c 335  347 d49  65 e  25  f4  10 g15  50 h7  10  0  8  ht48ra0-3/HT48CA0-3 rev.1.10 31 october 12, 2007 



   2  j % > 
product tape and reel specifications reel dimensions sop 20w symbol description dimensions in mm a reel outer diameter 330  1.0 b reel inner diameter 62  1.5 c spindle hole diameter 13.0+0.5  0.2 d key slit width 2.0  0.5 t1 space between flange 24.8+0.3  0.2 t2 reel thickness 30.2  0.2 ssop 20s (150mil) symbol description dimensions in mm a reel outer diameter 330  1.0 b reel inner diameter 62  1.5 c spindle hole diameter 13.0+0.5  0.2 d key slit width 2.0  0.5 t1 space between flange 16.8+0.3  0.2 t2 reel thickness 22.2  0.2 ht48ra0-3/HT48CA0-3 rev.1.10 32 october 12, 2007   $
$  
carrier tape dimensions sop 20w symbol description dimensions in mm w carrier tape width 24.0+0.3  0.1 p cavity pitch 12.0  0.1 e perforation position 1.75  0.1 f cavity to perforation (width direction) 11.5  0.1 d perforation diameter 1.5+0.1 d1 cavity hole diameter 1.5+0.25 p0 perforation pitch 4.0  0.1 p1 cavity to perforation (length direction) 2.0  0.1 a0 cavity length 10.8  0.1 b0 cavity width 13.3  0.1 k0 cavity depth 3.2  0.1 t carrier tape thickness 0.3  0.05 c cover tape width 21.3 ssop 20s (150mil) symbol description dimensions in mm w carrier tape width 16.0+0.3  0.1 p cavity pitch 8.0  0.1 e perforation position 1.75  0.1 f cavity to perforation (width direction) 7.5  0.1 d perforation diameter 1.5+0.1 d1 cavity hole diameter 1.5+0.25 p0 perforation pitch 4.0  0.1 p1 cavity to perforation (length direction) 2.0  0.1 a0 cavity length 6.5  0.1 b0 cavity width 9.0  0.1 k0 cavity depth 2.3  0.1 t carrier tape thickness 0.30  0.05 c cover tape width 13.3 ht48ra0-3/HT48CA0-3 rev.1.10 33 october 12, 2007  
1 
  2  .  
ht48ra0-3/HT48CA0-3 rev.1.10 34 october 12, 2007 copyright  2007 by holtek semiconductor inc. the information appearing in this data sheet is believed to be accurate at the time of publication. however, holtek as - sumes 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. holtek s products are not authorized for use as critical components in life support devices or systems. holtek reserves the right to alter its products without prior notification. for the most up-to-date information, please visit our web site at http://www.holtek.com.tw. holtek semiconductor inc. (headquarters) no.3, creation rd. ii, science park, hsinchu, taiwan tel: 886-3-563-1999 fax: 886-3-563-1189 http://www.holtek.com.tw holtek semiconductor inc. (taipei sales office) 4f-2, no. 3-2, yuanqu st., nankang software park, taipei 115, taiwan tel: 886-2-2655-7070 fax: 886-2-2655-7373 fax: 886-2-2655-7383 (international sales hotline) holtek semiconductor inc. (shanghai sales office) 7th floor, building 2, no.889, yi shan rd., shanghai, china 200233 tel: 86-21-6485-5560 fax: 86-21-6485-0313 http://www.holtek.com.cn holtek semiconductor inc. (shenzhen sales office) 5/f, unit a, productivity building, cross of science m 3rd road and gaoxin m 2nd road, science park, nanshan district, shenzhen, china 518057 tel: 86-755-8616-9908, 86-755-8616-9308 fax: 86-755-8616-9722 holtek semiconductor inc. (beijing sales office) suite 1721, jinyu tower, a129 west xuan wu men street, xicheng district, beijing, china 100031 tel: 86-10-6641-0030, 86-10-6641-7751, 86-10-6641-7752 fax: 86-10-6641-0125 holtek semiconductor inc. (chengdu sales office) 709, building 3, champagne plaza, no.97 dongda street, chengdu, sichuan, china 610016 tel: 86-28-6653-6590 fax: 86-28-6653-6591 holtek semiconductor (usa), inc. (north america sales office) 46729 fremont blvd., fremont, ca 94538 tel: 1-510-252-9880 fax: 1-510-252-9885 http://www.holtek.com


▲Up To Search▲   

 
Price & Availability of HT48CA0-3

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