Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/i2c_eeprom.asm @ 537:3091628b2742
BUGFIX: Spurious logbook read issue
author | heinrichsweikamp |
---|---|
date | Sun, 08 Jan 2012 12:44:51 +0100 |
parents | c512a868937c |
children | a587f491693d |
comparison
equal
deleted
inserted
replaced
536:e77df4e2d025 | 537:3091628b2742 |
---|---|
367 bra I2CReset_1 ; check for nine clock cycles | 367 bra I2CReset_1 ; check for nine clock cycles |
368 I2CReset_2: | 368 I2CReset_2: |
369 bsf TRISC,3 ; SCL Input | 369 bsf TRISC,3 ; SCL Input |
370 clrf SSPCON1 ; set I²C Mode | 370 clrf SSPCON1 ; set I²C Mode |
371 WAITMS d'10' ; Reset-Timeout for I2C devices | 371 WAITMS d'10' ; Reset-Timeout for I2C devices |
372 movlw b'00000000' | 372 movlw SSPSTAT_VALUE |
373 movwf SSPSTAT | 373 movwf SSPSTAT |
374 movlw b'00101000' | 374 movlw b'00101000' |
375 movwf SSPCON1 | 375 movwf SSPCON1 |
376 movlw b'00000000' | 376 movlw b'00000000' |
377 movwf SSPCON2 | 377 movwf SSPCON2 |
378 movlw d'8' ; 400kHz I2C clock @ 16MHz Fcy | 378 movlw SSPADD_VALUE |
379 movwf SSPADD | 379 movwf SSPADD |
380 bcf LED_red | 380 bcf LED_red |
381 ostc_debug 'O' ; Sends debug-information to screen if debugmode active | 381 ostc_debug 'O' ; Sends debug-information to screen if debugmode active |
382 return | 382 return |
383 | 383 |