Yup, like I said, that's exactly where I found the answer.
Things worked great, until I got cocky.
Yeah, I also noticed that more devices screws up stuff. At least I have Ralph's link to help me out to figure the correct resistance value.
Robert
![]()
Yup, like I said, that's exactly where I found the answer.
Things worked great, until I got cocky.
Yeah, I also noticed that more devices screws up stuff. At least I have Ralph's link to help me out to figure the correct resistance value.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Hmm, still getting unreliable results.
Sorry, but the oscilloscope readings are still just a tad over my head. I was hoping to be able to diagnose this problem with more conventional techniques (if I can).
I placed my multimeter on 2000pF, the only pF setting I have, plugged 2 wires in the built-in holes (for capacitors) and then tested from SDA pin on PIC up to SDA pin on MCP.
I get 30pF, but now I realize that the wires I'm using could very well affect the reading. The probes only test A, V, Ohms and Hz, so I can't use those.
I had used 1.5K pull-up resistors and that had helped a lot. But it still has a way to go for reliable performance. I'll do as mentionned above and lower the resistor slowly and see if things improve.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
One note about this circuit:
- PIC 16F877 mcu
- triple MCT6 opto-couplers
- 24AA512 eeprom
- dual MCP23016 (one used as input, one as output)
I use the MCT6 to switch between the SDA lines on the I2C devices. I used both sides of the MCT6 per device to permit bidirectional transfer.
The SCL line is shared amongst all the I2C devices.
I separated the input and output MCP23016 because I plan to have 8 of each later. I am only using one now to test the system.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
A picture is better and easier to spot the mistakes.
Robert
![]()
Last edited by Demon; - 23rd October 2005 at 04:14.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Ok, I went down to 1K and things seemed worse. So I went the other way and tried 2.2K with perfect results.
The part that sucks about this is that the breadboard and PCB and NOT going to have identical capacitance. I may not know what I'm talking about, but I know that much.
It sure is nice to see the circuit act as it should though. At least now I have an idea of where to look if things act up when I print this circuit. Some trial&error with resistors at worse, if I'm lucky I'll learn how to use an oscilloscope properly by then.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Robert,
you should really read the I2C Specs.
Your schematic will never work.
The SDA Line is Bidirectional!
I2C is a BUS, so why separating the SDA lines
if there are no more than 8 devices of the same type on the same bus?
If (for what reason ever) you want to isolate the bus use THIS schematic.
Attached is a schematic that should work for you.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hi Ralph.Originally Posted by NavMicroSystems
I did, that's where I got the idea to go down to 1.5K for the pull-up resistors. Page 40somethings had interesting values.Originally Posted by NavMicroSystems
Wanna bet? :lol: It's working perfectly.Originally Posted by NavMicroSystems
- I pull the MCT6 for the eeprom high.
- I can read data from memory and display it on an LCD.
- I pull the MCT6 back low.
- I pull the MCT6 for the output MCP23016 high (the first one).
- I can turn on whichever LEDs are identified on the eeprom data.
I am now in the process of activating the 2nd MCP23016 which will be used as input.
I know, I said that on post #12.Originally Posted by NavMicroSystems
I know. I gave notes on my circuit on post #12 to explain my reasoning. Right now I'm testing with one input and one output MCP23016, but I plan on having 8 input and 8 output later. Actually, I'm going to have even more than that. I'm going to add an MCT6 for each additionnal 'network' of 8 MCP23016 devices.Originally Posted by NavMicroSystems
Link no workie, red X.Originally Posted by NavMicroSystems
No workie either.Originally Posted by NavMicroSystems
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Heille salope, mon e-mail vidéotron ma chié dans les mains alors si tu essaie de me contacter c peine perdue.. j'attends encore après eux... HouHou service a la clientele
Anyways. That's a strange design you have. What do you expect from your Opto-Coupler? A short-long history will be appreciated... at least for me the slow single brain cell.
Usually all SDA & SCL lines are connected together without anything else and use 2 pull-up resistors. that's it, that's all, no preservative, no aspartame, fat free. As usual, 0.1uF ceramice close to each I2C device is highly recommended.
On a design i'm working on NOW, i have 1 X PCF8574, 4 X 24LC64 on the same I2C bus and i use 4.7K without problems... as now
It appear in some case, on certain board design, that some I/O on certain PORT react weird depending the speed you mess with. Sometime reducing speed help. I can't remember on wich PIC i had a weird issue but i choose 2 I/O that are not one next to the oher (B.0, B1..) and it cure the problem. Seems to be another Read-Modify-Write issue.
__________________________________________________ ___________________________
EDIT: Sorry Ralph, didn't notice your post... as you know, i'm still trying to deal with my emotions since you know why![]()
Last edited by mister_e; - 23rd October 2005 at 13:33.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Ralph,
maybe i'm the ony one or my computer miss some internet plug-in, but i can't see your schematic... are you using P82B96 or any other Philips in the PCA951X family?
I ask you that because my next design (on wich i'll probably spend ... few months maybe a year on), i'll have to deal with around 100 (maybe more) of those hot-swap I2C buffer to protect the main frame while the user change/add/swap control slots/modules.
Sorry Robert to be off topic![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Since the MCP (like most other I2C Devices) has 3 address bits you can have up to 8 devices of the same type sharing one bus.Originally Posted by Demon
For more than 8 (up to 16) devices of the same type share SCL for all of them and have separate SDA for each set of 8.
So to communicate with 16 Devices of the same type you need three Ports on the PIC.
I don't use the MCP, I prefer the PCF8574.
There is an "A" version available that has a control-byte different from the "non A" version, so you can have up to 16 (8x"A" & 8x"non A") devices sharing one pair of SDA cnd SCL lines.
Last edited by Demon; - 4th October 2016 at 19:10.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks