Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
mov #tblpage(Batt_Cap_Data), W0 ;Load W0 with program memory page of data array
mov W0, TBLPAG ;Copy W0 to table page register (high word of program memory address)
mov #tbloffset(Batt_Cap_Data), W0 ;Load W0 with low word program memory address of data array first entry
mov ADC1BUF0, W1 ;Copy ADC result to W1
mov W1, BATTCAP_ADC ;Copy W1 to BattCap_ADC
sl W1, W1 ;Shift W1 left (multiply by 2), put in W1
add W0, W1, W0 ;Compute the offset here (must be a multiple of 2)
tblrdl [W0], W1 ;Copy value in program memory address TBLPAG:W0 to W1
mov W1, BATTCAP ;Copy W1 to battery capacity
Temp_Table
movff PCL, PCL_TMP
movlw 0x16
addwf PCL_TMP, f
clrf WREG
addwfc PCLATH, f
movf INDEX1, w
addwf PCL_TMP, f
movf INDEX2, w
addwfc PCLATH, f
movf PCL_TMP, w
movwf PCL
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;007
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;015
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;023
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;031
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;039
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;047
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;055
dt d'255', d'255', d'255', d'255', d'255', d'255', d'255', d'255' ;063
dt d'255', d'255', d'255', d'255', d'255', d'254', d'252', d'250' ;071
dt d'248', d'247', d'246', d'245', d'244', d'242', d'241', d'240' ;079
dt d'239', d'238', d'237', d'236', d'234', d'233', d'232', d'230' ;087
dt d'229', d'228', d'227', d'226', d'225', d'224', d'223', d'222' ;095
dt d'220', d'219', d'218', d'217', d'216', d'215', d'214', d'213' ;103
dt d'212', d'211', d'210', d'209', d'208', d'207', d'206', d'205' ;111
dt d'204', d'203', d'202', d'201', d'200', d'199', d'198', d'198' ;119
dt d'197', d'196', d'195', d'194', d'193', d'192', d'191', d'190' ;127
dt d'189', d'188', d'187', d'186', d'186', d'185', d'184', d'183' ;135
dt d'182', d'181', d'180', d'180', d'179', d'178', d'177', d'176' ;143
dt d'175', d'174', d'173', d'172', d'171', d'170', d'169', d'168' ;151
dt d'168', d'167', d'166', d'166', d'165', d'164', d'163', d'162' ;159
dt d'161', d'160', d'159', d'158', d'157', d'156', d'155', d'154' ;167
dt d'153', d'152', d'151', d'150', d'149', d'148', d'147', d'146' ;175
dt d'145', d'144', d'143', d'142', d'141', d'140', d'139', d'138' ;183
dt d'137', d'136', d'135', d'134', d'133', d'132', d'131', d'130' ;191
dt d'129', d'128', d'127', d'126', d'125', d'124', d'123', d'122' ;199
dt d'120', d'118', d'117', d'116', d'115', d'114', d'113', d'112' ;207
dt d'111', d'110', d'108', d'106', d'105', d'104', d'103', d'102' ;215
dt d'101', d'100', d'099', d'098', d'096', d'094', d'092', d'090' ;223
dt d'088', d'086', d'084', d'082', d'080', d'078', d'076', d'074' ;231
dt d'072', d'070', d'068', d'066', d'064', d'062', d'060', d'058' ;239
dt d'054', d'050', d'046', d'042', d'040', d'035', d'030', d'025' ;247
dt d'020', d'010', d'000', d'000', d'000', d'000', d'000', d'000' ;255