Electronic Components Datasheet Search |
|
AN114 Datasheet(PDF) 11 Page - Xicor Inc. |
|
AN114 Datasheet(HTML) 11 Page - Xicor Inc. |
11 / 12 page 11 of 12 AN 114 Application Note www.xicor.com REV 1.1 11/12/02 ;----------------------------------------------------------------------------- ; ; PUT MAIN PROGRAM HERE... ; ; Below are sample main programs calling the various command routines ; ;----------------------------------------------------------------------------- main: mov SP, #STACK_TOP; Initialize stack pointer ;---------------------------------------------------------------------------- ; ; The following section is required for the Cygnal processor. This could ; change for different versions of the 80C51. ; ; Disable the WDT. (IRQs not enabled at this point.) ; If interrupts were enabled, they would need to be explicitly disabled ; so that the 2nd move to WDTCN occurs no more than four clock ; cycles after the first move to WDTCN. clr EA ; Disable interupts mov WDTCN, #0DEh; Cygnal processor specific mov WDTCN, #0ADh; Cygnal processor specific ; Enable the Port I/O Crossbar mov XBR2, #40h ; Cygnal processor specific (enable weak pull ups) mov PRT1CF, #00h ; Cygnal processor specific ; Set no ports as push-pull (this processor ; operates from 3.3V, but the X9408 operates from ; 5V, so the 8051 outputs must be pulled up to 5V ; with external resistors.) ;----------------------------------------------------------------------------- ; ; The following are sample code segments for use in the main program... ; The potentiometer was A0-A3 pins were set to address 0Ch. ; ;----------------------------------------------------------------------------- write_2_wcr: mov ADDR_BYTE, #SLAVE_ADR12; Load Slave address byte mov ID, #WCR_2 ; Specify WCR for DCP#2 mov COMMAND, #WRITEWCR; Write to WCR mov DATA_BYTE, #43; Set wiper position to tap 43 call execute read_from_wcr: mov ADDR_BYTE, #SLAVE_ADR12; Load Slave address byte mov ID, #WCR_2 ; Specify WCR for DCP#2 mov COMMAND, #READWCR; Read WCR call execute ; WCR value is in DATA_BYTE write_2_dr: mov ADDR_BYTE, #SLAVE_ADR12; Load Slave address byte mov ID, #DCP2_R1; Specify DR#1 for DCP#2 mov COMMAND, #WRITEDR; Write to DR mov DATA_BYTE, #21; Set data value to 21 call execute |
Similar Part No. - AN114 |
|
Similar Description - AN114 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | 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 |