Can you elaborate just a bit more please?
Robert
![]()
Can you elaborate just a bit more please?
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 lot of the newer PICs have a hardware I2C port. The 18F8722 for example, has two ports. Microchip calls these "SSP" or "MSSP" ports.
Just as SERIN and SEROUT use pure software to manipulate ports, I2CREAD and I2CWRITE use software to simulate a true hardware I2C port. Since everything is done in software, the processor is tied up 100% of the time during the entire operation.
HSERIN and HSEROUT use the PIC's USART. If these are used, the software simply needs to write to or read from a register, and hardware takes over to send or receive the bit stream. From a processor standpoint, HSEROUT is hundreds of times faster than SEROUT.
The same thing is true with I2C. If you can use the PIC's built-in hardware to do the task, it is MUCH quicker than using I2CREAD and I2CWRITE.
Unfortunately, I'm in the process right now of learning how to use the specialized I2C hardware. As a result, I'm not much of a resource (at least not today) when it comes to actual implementation.
Charles Linquist
I'm using the 18F4550 as main processor and it has both the USB and SPP features. I have a LCD tied to the SPP port already, and nearly all the other pins are used.
Is there a device that could take I2C input and then output through USART? I know MicroChip has a lot of 'stuff', but I don't have any experience in this area.
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!
how many byte do you read at the time?
still working with a single byte at the time? if so, just do loop and insert a USBSERVICE inside
As now i didn't use I2CREAD/WRITE with USB ones so...The MSSP is also suggest by me.
Charles.. i'm with you![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Steve, the MCP23016 has 16 bytes and I'm using at least 13 of them.
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!
miip 16 bits, 2 bytes. i don't remind how to access to them.. since too much time i don't use themcan you refresh my single workable brain cell on this friday before i left home to night club
![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
D'uh, yeah, bits.
I just use I2CREAD for a WORD and get all 16 bits in one shot.
I checked the MicroChip site and they have the MCP23S17 which goes at a maximum of 10MHz in SPI mode. I don't think that's worth the effort to even try.
But I did get another idea; using a 16F628 to read the MCP23016, sets 4 output pins to a binary value (I just need the number of the 1st active pin) and then sets a READY pin. The 18F4550 works on USB until the READY pin is set and then reads the 4 input pins. TADAA!!! Super fast 16 bit parallel exchange between 2 mcus.
I just don't know how the 18F4550 can reset the READY pin though. I never got a full grasp of that concept.
Robert
EDIT: Reviewing my own thread from a while ago:
http://www.picbasic.co.uk/forum/show...ight=busy+line
Last edited by Demon; - 8th July 2006 at 02:22.
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!
mmm, that make me think of few things to try on sunday... i'l do some test with the 4550 and I2C... Anyways i guess that one project i have in head will probably need at least one I2C external device... so i'll hae to mess with I2CREAD/WRITE and/or MSSP anyway.
Your point is valid but need extra hardware... sure workable, but it have to be done without it. The MSSP is the one i mostely suspect workable. SPI is faster than I2C... but MSSP i2C is more fast than PBP I2CREAD/WRITE
mmm...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks