Skip to main content
Visitor II
January 30, 2013
Question

STM8S I2c

  • January 30, 2013
  • 4 replies
  • 1601 views
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
    This topic has been closed for replies.

    4 replies

    Visitor II
    February 8, 2013
    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.

    Visitor II
    February 8, 2013
    Super User
    February 10, 2013
    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...?
    Visitor II
    February 11, 2013
    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