Mercurial > public > hwos_code
comparison src/adc_lightsensor.asm @ 117:6c577737c34e
minor
author | heinrichsweikamp |
---|---|
date | Wed, 25 Jun 2014 12:39:14 +0200 |
parents | f3062a611eef |
children | abd30446e1cd |
comparison
equal
deleted
inserted
replaced
116:737d6f488729 | 117:6c577737c34e |
---|---|
321 bcf ADCON0,0 ; power off ADC | 321 bcf ADCON0,0 ; power off ADC |
322 bcf adc_running ; =1: The ADC is in use | 322 bcf adc_running ; =1: The ADC is in use |
323 return | 323 return |
324 | 324 |
325 global piezo_config ; Sets up piezo sensitivity of heinrichs weikamp Piezo buttons (~30ms) | 325 global piezo_config ; Sets up piezo sensitivity of heinrichs weikamp Piezo buttons (~30ms) |
326 piezo_config: | 326 piezo_config: ; Settings between 20 and 200 |
327 movlw .20 | 327 movlw .25 ; right button |
328 rcall piezo_config_tx ; Send one byte | 328 rcall piezo_config_tx |
329 movlw .20 | 329 movlw .25 ; left button |
330 rcall piezo_config_tx ; Send one byte | 330 rcall piezo_config_tx |
331 movlw .100 | 331 movlw .200 ; reserved |
332 rcall piezo_config_tx ; Send one byte | 332 rcall piezo_config_tx |
333 movlw .200 | 333 movlw .200 ; reserved |
334 rcall piezo_config_tx ; Send one byte | 334 rcall piezo_config_tx |
335 return | 335 return |
336 | 336 |
337 piezo_config_tx: | 337 piezo_config_tx: ; Send one byte |
338 movwf uart1_temp ; Store byte | 338 movwf uart1_temp ; Store byte |
339 movlw .8 | 339 movlw .8 |
340 movwf uart2_temp ; Bit counter | 340 movwf uart2_temp ; Bit counter |
341 bcf TX3_PIEZO_CFG ; Startbit | 341 bcf TX3_PIEZO_CFG ; Startbit |
342 rcall piezo_config_wait_bit | 342 rcall piezo_config_wait_bit |