CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sat Dec 16, 2017 3:38 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: I2C muxing library
PostPosted: Fri Nov 17, 2017 7:32 am 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 30
3S Moderator:
thanks for sharing this added to CODESYS V3 Raspberry Pi share your devices & libraries & applications
viewtopic.php?f=23&t=5872&p=18200#p19664

Hello,

Here is my Library for some I2C devices for CODESYS.
You can place all devices behind a multiplexer to reduce address conflicts.
Although include the BME280 Environment sensor and an SD1306 Display Driver.
Look at google for these little funny Displays.
All fonts are working on the display, but not the biggest. There the bits have to be twisted.
If you find any problems, tell me, the Drives have not been tested all.


Don't look at the documentation, there is none ... ;).

In the I2C_Base FB I did write some info’s for the muxing.

With the muxing IC you can connect about 33554432 BME280 on the raspi, but then bus cycle time is no longer a problem ;).

You will need the OSCAT building lib to compile. i can not uplode it here like the OSCAT BASIC lib(to big), so try the lib from the store.


Device list:

BME280
25C512 64KiB EEPROM
An 4channel dimmer (I done this for an friend)
PCA9555 as 16 bit input
PCA9555 as 16 bit output
PCA9685 a 16 channel 12bit PWM output, inspired by example code of CODESYS but writes only when output value is changing
PCF8575 as 16 bit input
PCF8575 as 16 bit output
SSD1306 Display Driver
TCA9548 8 channel I2C Multiplexer/switch
TSL2561 lux sensor, state I would say experimental

Greetings Stefan


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: I2C muxing library
PostPosted: Fri Nov 17, 2017 1:22 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 30
Hi,

forgot the xml's

Greetings


You do not have the required permissions to view the files attached to this post.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited