2013-01-30 02:34 AM
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 debruyne2013-02-08 04:52 AM
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.2013-02-08 06:45 AM
I once had problems with I2C on the 105c6 because these pins have no internal pull up function. Maybe you have the same problem?
There was more here: https://my.st.com/public/STe2ecommunities/mcu/Lists/STM8SDiscovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM8SDiscovery%2FGPIO%20Pull-up%20resistors%20on%20Port%20E&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000CCDF802E596CAF44ADED5E61F5CA8B1B¤tviews=5622013-02-10 07:11 AM
''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...?2013-02-11 02:18 AM
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