-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I am using SoundCortexLPC and I can write data perfectly well to it via I2C, but I can't seem to read data.
With PSG registers I always get 0xA1 as answer.
With SCC addresses I almost always get 0xA3 as answer.
This seems to match the addresses of the IOEXT protocol.
If you build it with IOEXT support enabled, IO ports are assigned as
* 0xA0: PSG address latch
* 0xA1: PSG data read/write
* 0xA2: SCC address latch
* 0xA3: SCC data read/write
I use MicroPython, and the code I use for testing is as follows:
- For PSG
for reg in range(16):
_i2c0.readfrom_mem(0x50, reg, 2)Which returns the following:
1 ... b'\xa1\xa1'
2 ... b'\xa1\xa1'
3 ... b'\xa1\xa1'
...
14 ... b'\xa1\xa1'
15 ... b'\xa1\xa1'
16 ... b'\xa1\xa1'
- For SCC
for reg in range(256):
_i2c0.readfrom_mem(0x51, reg, 2)Which returns the following:
1 ... b'\xa3\xa3'
2 ... b'\xa3\xa3'
3 ... b'\xa3\xa3'
...
254 ... b'\xa3\xa3'
255 ... b'\x01\x01'
256 ... b'\x01\x01'
Metadata
Metadata
Assignees
Labels
No labels