ATtiny85 - PCF8574 I/O Expander

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video io expander pcf 8574 is interfaced with the i squared c bus of 80 tiny 85 to add multiple 8-bit ports to the microcontroller 80 tiny 85 has a small footprint which makes it desirable in embedded applications however this microcontroller has only five usable i o pins which could be a limitation in some applications to increase the number of i o lines of the microcontroller we can use the i o expander pcf 8574 which is interfaced with the microcontroller using i squared c bus i see pcf 8574 is an i squared c bus to 8-bit parallel port expander it is interfaced to a microcontroller using the i squared c bus with speed up to 100 kilohertz we can interface eight of these ics with a microcontroller and each ic will have a unique slave address which is identified by these three programmable address pins the ic gives us an 8-bit port where this is the least significant nibble of the port while this is the most significant nibble of the port this block diagram shows us the interfacing of eight pcf 8574 ics interface with 80 tiny 85 microcontroller via the i squared c bus thus giving us eight 8-bit io ports in this video we have 3 pcf 8574 interface with 80 tiny 85 via the i squared c bus the 7-bit slave address of the first device is hexadecimal 2-0 the slave address of the second device is hexadecimal 24 and the slave address of the third device is hexadecimal 27. we also have 8-bit led displays in the form of bar graphs interface with the pcf 8574 the displays will show the bytes sent by the 80 tiny 85 microcontroller in the c sketch we'll be using the tiny wire library to program the pcf 8574 within the setup function this function will program the universal serial interface of the 80 tiny 85 microcontroller as an i squared c interface inside the loop function we begin the transmission by sending the slave address of the first device and then we send the byte to be displayed and then we end the transmission we do the same for the second device we first send the address and then we send the byte to be displayed and then we end the transmission and finally for the third device we send the 7-bit slave address and then the byte to be displayed and then we end the transmission and now for a quick demonstration in this next demonstration we will display on the first device an 8-bit count up on the second device we will display a moving bit and on the third device we will display an 8-bit countdown in this next demonstration we have five i o expanders interface with the 80 tiny 85 the address of the first expander is 20 hexadecimal and the address of the last expander is 24 and connected to the i o expanders we have a 40 bit bar graph display that shows the knight rider effect within the setup function and after we initialize the 80 tiny 85 i squared c we call this function to clear the display inside function clear display we use a nested for loop to clear all the parts of the five i o expanders to get the nitrider effect we use a nested for loop to scroll the led from left to right next we use another nested for loop to scroll the led from right to left in conclusion pcf 8574 i o expander is easy to program and can easily expand the i o capabilities of a microcontroller especially 80 tiny 85. thank you for watching you
Info
Channel: Anas Kuzechie
Views: 6,216
Rating: undefined out of 5
Keywords:
Id: qU_-u54BokE
Channel Id: undefined
Length: 5min 39sec (339 seconds)
Published: Mon Mar 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.