comparison code_part1/OSTC_code_asm_part1/eeprom_rs232.asm @ 578:fbd5e2b75a63

adding access to CF64-CF95
author heinrichsweikamp
date Tue, 24 Apr 2012 08:39:43 +0200
parents 3091628b2742
children 6e456a6398e0
comparison
equal deleted inserted replaced
577:e3ffc6d62a63 578:fbd5e2b75a63
38 38
39 read_int_eeprom_1: 39 read_int_eeprom_1:
40 movwf EEADR 40 movwf EEADR
41 bra read_eeprom ; reads and "returns" after write 41 bra read_eeprom ; reads and "returns" after write
42 42
43 internal_eeprom_access_b2: ; accesses internal EEPROM BANK 2 via the UART
44 bcf internal_eeprom_write3 ; clear flag!
45 movlw d'2'
46 movwf EEADRH ;BANK1
47 movlw "n"
48 bra internal_eeprom_access1 ; Continue with common routines
49
43 internal_eeprom_access_b1: ; accesses internal EEPROM BANK 1 via the UART 50 internal_eeprom_access_b1: ; accesses internal EEPROM BANK 1 via the UART
44 bcf internal_eeprom_write2 ; clear flag! 51 bcf internal_eeprom_write2 ; clear flag!
45 movlw d'1' 52 movlw d'1'
46 movwf EEADRH ;BANK1 53 movwf EEADRH ;BANK1
47 movlw "i" 54 movlw "i"
48 bra internal_eeprom_access1 ; Continue with bank1 and bank0 common routines 55 bra internal_eeprom_access1 ; Continue with common routines
49 56
50 internal_eeprom_access_b0: ; accesses internal EEPROM BANK 0 via the UART 57 internal_eeprom_access_b0: ; accesses internal EEPROM BANK 0 via the UART
51 bcf internal_eeprom_write ; clear flag! 58 bcf internal_eeprom_write ; clear flag!
52 clrf EEADRH ; Bank0 59 clrf EEADRH ; Bank0
53 movlw "d" 60 movlw "d"
54 ; bra internal_eeprom_access1 ; Continue with bank1 and bank0 common routines 61 ; bra internal_eeprom_access1 ; Continue with common routines
55
56 internal_eeprom_access1: 62 internal_eeprom_access1:
57 movwf TXREG ; Send command echo ("i" or "d") 63 movwf TXREG ; Send command echo ("i", "d" or "n")
58 bsf no_sensor_int ; No Sensor Interrupt 64 bsf no_sensor_int ; No Sensor Interrupt
59 movlw d'4' 65 movlw d'4'
60 movwf EEADR 66 movwf EEADR
61 bcf PIE1,RCIE ; no interrupt for UART 67 bcf PIE1,RCIE ; no interrupt for UART
62 bcf PIR1,RCIF ; clear flag 68 bcf PIR1,RCIF ; clear flag