cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S I2c

debruyne.marc
Associate II
Posted on January 30, 2013 at 11:34

hello,

i try to make a connection between the stm8s207 and an pcf8574.

the problem is with the software, because i can control the pcf8574 with an AARDVARK analyzer.

when i send a start and an adress (40) for pcf8574 then i do not see any pilses on PE1 and PE2

i use a crystal of 14.7456Mhz because of the UART.

please take a look at the attached assembly file.

and ,let me know what i doing wrong.

many thanks

marc debruyne
4 REPLIES 4
Stm32User
Associate II
Posted on February 08, 2013 at 13:52

Is there any particular reason why you are writing in assembler ?

Why not write in C ?  You can then use the ST firmware library which has I2C drivers already written and debugged.

klaasdc
Associate II
Posted on February 10, 2013 at 16:11

''these pins have no internal pull up function. Maybe you have the same problem?''

That could explain why it works with the Aardvark - perhaps the Aardvark provides pullups...?
debruyne.marc
Associate II
Posted on February 11, 2013 at 11:18

hello sir,

no the aardvark use the 7 bit  and must be set to 20 while the normal addres for a 8574 is 40

the aardvark people told me that;

and its working