STM8S I2c
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-01-30 2:34 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-08 4:52 AM
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.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-08 6:45 AM
Posted on February 08, 2013 at 15:45
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=562Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-10 7:11 AM
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...?
A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
A complex system designed from scratch never works and cannot be patched up to make it work.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-11 2:18 AM
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