Since I find no solution with the
MSP430F2012 to realize a functional I2C slave, I used another MSP430 (
MSP430FR2422). The MSP4302F422 has better I2C features in my opinion.
Unfortunately I got other problems with this device.
If I program the ports 1.0 .. 1.7 as outputs, the outputs 1.0..1.3. are no longer present after a power off / on. It seems like they have become analog inputs. The outputs are only available, if I do the following:
1) erase the memory of the
MSP430FR2422 with the program "Elprotronic"
2) reprogram the Device.
Then, after a power off / on, the outputs are again no longer available.
I can repeat this procedure multiple times.
Always after a power off/on the outputs 1.0 .. 1.3. are no longer available.
my assembler I have testet tis at CSS:
;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio
;
;
;-------------------------------------------------------------------------------
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.
;-------------------------------------------------------------------------------
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer
mov.b #0xff,&P1DIR
repeat
mov.b #0xff,&P1OUT
call #delay
mov.b #0,&P1OUT
call #delay
jmp repeat
nop
delay
mov #10,R11
repeat1 clr r12
dekrem dec r12
jnz dekrem
dec r11
jnz repeat1
ret
regards Jurgen