Picaxe 40x2 and sram PCF8570P

kolber

New Member
Hello,
communication with memory 24LC512 me functions normally so examine memory sram PCF8570P. Here it but be in a tight spot plus malfunctions me it. You do not have somebody some counsel?
Thanks Honza


For w0 = 0 to 20
hi2csetup I2CMASTER, %10100010, i2cslow, i2cword
Hi2cOut w0,(b3)
b3 = b3 + 1
Next

pause 1000

For w0 = 0 to 20
hi2csetup I2CMASTER, %10100010, i2cslow, i2cword
Hi2cIn w0,(b4)

SerTxd( #w0," ",#b4,CR,LF )
Next

end
 

hippy

Ex-Staff (retired)
The PCF8570 is a byte addressed memory so it requires 'i2cbyte' rather than 'i2cword' ( the datasheet description of "word address" is somewhat confusing ).

It is also not necessary to reissue 'hi2csetup' commands, just one at the start should do.

The following has not been tested but may be what you need -

hi2csetup I2CMASTER, %10100010, i2cslow, i2cbyte

For w0 = 0 to 20
Hi2cOut w0,(b3)
b3 = b3 + 1
Next

pause 1000

For w0 = 0 to 20
Hi2cIn w0,(b4)
SerTxd( #w0," ",#b4,CR,LF )
Next

end
 
Top