| Electronic Components Datasheet Search |
|
EM78P342N Datasheet(PDF) 68 Page - ELAN Microelectronics Corp |
|
|
|||||||||||||||||||||||||||||
EM78P342N Datasheet(HTML) 68 Page - ELAN Microelectronics Corp |
|
68 / 118 page ![]() EM78P342N 8-Bit Microprocessor with OTP ROM 60 Product Specification (V1.5) 04.18.2016 (This specification is subject to change without prior notice) 6.7.6.2 Sample Demo Programs R_0 == 0 ; Indirect addressing register PSW == 3 ; Status register PORT5 == 5 PORT6 == 6 R E== 0XE ; Interrupt status register B. Define a Control Register IOC50 == 0X5 ; Control Register of Port 5 IOC60 == 0X6 ; Control Register of Port 6 IOCE0== 0XE ; Interrupt Mask Register 2 C_INT== 0XF ; Interrupt Mask Register C. ADC Control Register ADDATA == 0xB ; The contents are the results of ADC AISR == 0x08 ; ADC input select register ADCON == 0x9 ; 7 6 5 4 3 2 1 0 ; VREFS CKR1 CKR0 ADRUN ADPD ADIS2 ADIS1 ADIS0 D. Define Bits in ADCON ADRUN == 0x4 ; ADC is executed as the bit is set ADPD == 0x3 ; Power Mode of ADC E. Program Starts ORG 0 ; Initial address JMP INITIAL ; ORG 0x0C ; Interrupt vector JMP CLRRE ; ;(User program section) ; CLRRE: MOV A,RE AND A, @0BXX0XXXXX ; To clear the ADIF bit, “X” by application MOV RE,A BS ADCON, ADRUN ; To start to execute the next AD conversion ; if necessary RETI INITIAL: MOV A,@0B00000001 ; To define P50 as an analog input MOV AISR,A MOV A,@0B00001000 ; To select P50 as an analog input channel, and ; AD power on MOV ADCON,A ; To define P50 as an input pin and set clock ; rate at fosc/16 En_ADC: MOV A, @0BXXXXXXX1 ; To define P50 as an input pin, and the others ; are dependent on applications IOW PORT5 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |