comparison src/i2c.asm @ 564:54346c651b6a

bring digital S8 HUD back to life...
author heinrichsweikamp
date Mon, 05 Feb 2018 17:59:55 +0100
parents b7eb98dbd800
children 0ba88db66492
comparison
equal deleted inserted replaced
563:f4faff954816 564:54346c651b6a
1065 bra WaitMSSP ;(and return) 1065 bra WaitMSSP ;(and return)
1066 1066
1067 1067
1068 global I2C_get_tankdata 1068 global I2C_get_tankdata
1069 I2C_get_tankdata: 1069 I2C_get_tankdata:
1070 ;
1071 ; movlw .1
1072 ; movff WREG,rx_buffer+0
1073 ; movlw .125
1074 ; movff WREG,rx_buffer+1
1075 ; movlw HIGH .1500
1076 ; movff WREG,rx_buffer+2
1077 ; movlw LOW .1500 ; 150,0bar
1078 ; movff WREG,rx_buffer+3
1079 ;
1080 ; movlw .1
1081 ; movff WREG,rx_buffer+6
1082 ; movlw .140
1083 ; movff WREG,rx_buffer+7
1084 ; movlw HIGH .2251
1085 ; movff WREG,rx_buffer+8
1086 ; movlw LOW .2251 ; 225,1bar
1087 ; movff WREG,rx_buffer+9
1088 ;
1089 ;
1090 ;
1091 ; return ;mH
1092
1093
1094 bsf SSP1CON2,SEN ; Start condition 1070 bsf SSP1CON2,SEN ; Start condition
1095 rcall WaitMSSP 1071 rcall WaitMSSP
1096 movlw 0x50 ; Address byte + Write bit 1072 movlw 0x50 ; Address byte + Write bit
1097 movwf SSP1BUF ; control byte 1073 movwf SSP1BUF ; control byte
1098 rcall WaitMSSP 1074 rcall WaitMSSP