List of figures
Figure 1. A96G166/A96A166/A96S166 Block Diagram ........................................................................ 14
Figure 2. A96G166 16SOPN Pin Assignment ....................................................................................... 15
Figure 3. A96G166 20TSSOP/20SOP Pin Assignment ........................................................................ 16
Figure 4 A96A166 20SOP Pin Assignment ........................................................................................... 16
Figure 5. A96S166 20TSSOP Pin Assignment ..................................................................................... 17
Figure 6. A96G166 20 QFN Pin Assignment ........................................................................................ 18
Figure 7. A96G166 28SOP Pin Assignment ......................................................................................... 19
Figure 8. A96G166 32 LQFP Pin Assignment ....................................................................................... 19
Figure 9. General Purpose I/O Port ...................................................................................................... 24
Figure 10. External Interrupt I/O Port .................................................................................................... 25
Figure 11. Program Memory Map ......................................................................................................... 27
Figure 12. Data Memory Map ............................................................................................................... 28
Figure 13. Lower 128bytes of RAM ...................................................................................................... 28
Figure 14. XDATA Memory Area ........................................................................................................... 29
Figure 15. Interrupt Group Priority Level ............................................................................................... 53
Figure 16. External Interrupt Description .............................................................................................. 54
Figure 17. Interrupt Controller Block Diagram ...................................................................................... 55
Figure 18. Interrupt Sequence Flow ...................................................................................................... 58
Figure 19. Case A: Effective Timing of Interrupt Enable Register ......................................................... 59
Figure 20. Case B: Effective Timing of Interrupt Flag Register ............................................................. 59
Figure 21. Effective Timing of Multi-Interrupt ........................................................................................ 60
Figure 22. Interrupt Response Timing Diagram .................................................................................... 61
Figure 23. Correspondence between Vector Table Address and the Entry Address of ISR ................. 61
Figure 24. Saving/Restore Process Diagram and Sample Source ....................................................... 61
Figure 25. Timing Chart of Interrupt Acceptance and Interrupt Return Instruction ............................... 62
Figure 26. Clock Generator Block Diagram .......................................................................................... 71
Figure 27. Basic Interval Timer Block Diagram ..................................................................................... 74
Figure 28. Watch Dog Timer Interrupt Timing Waveform ...................................................................... 77
Figure 29. Watch Dog Timer Block Diagram ......................................................................................... 78
Figure 30. Watch Timer Block Diagram ................................................................................................ 81
Figure 31. 8-bit Timer/Counter Mode for Timer 0 .................................................................................. 85
Figure 32. 8-bit Timer/Counter 0 Example ............................................................................................ 85
Figure 33. 8-bit PWM Mode for Timer 0 ................................................................................................ 86
Figure 34. PWM Output Waveforms in PWM Mode for Timer 0 ........................................................... 87
Figure 35. 8-bit Capture Mode for Timer 0 ............................................................................................ 88
Figure 36. Input Capture Mode Operation for Timer 0 .......................................................................... 89
Figure 37. Express Timer Overflow in Capture Mode ........................................................................... 89
Figure 38. 8-bit Timer 0 Block Diagram ................................................................................................ 90
Figure 39. 16-bit Timer/Counter Mode of Timer 1 ................................................................................. 93
Figure 40. 16-bit Timer/Counter Mode Operation Example .................................................................. 94
Figure 41. 16-bit Capture Mode of Timer 1 ........................................................................................... 95
Figure 42. 16-bit Capture Mode Operation Example ............................................................................ 96
Figure 43. Express Timer Overflow 16-bit Capture Mode ..................................................................... 96
Figure 44. 16-bit PPG Mode of Timer 1 ................................................................................................ 97
Figure 45. 16-bit PPG Mode Operation Example ................................................................................. 98
Figure 46. 16-bit Complementary PWM Mode for Timer 1 ................................................................... 99
Figure 47. 16-bit Complementary PWM Mode Timing chart for Timer 1 ............................................ 100
Figure 48. 16-bit Timer 1 Block Diagram ............................................................................................ 101