mattallen37
New Member
I want to make a keyboard interface to a Lego NXT, using a PICAXE 20X2.
I have made working I2C code for both the 20X2, and the NXT, so they can "talk" (NXT is the master).
I have also made a program for the 20X2 that successfully gets key strokes (I know it is successful, as I have it send the data over serial to a computer terminal program).
The problem, is that the PICAXE won't do both, I2C and KB commands. It works fine for either one, but totally fails as an I2C slave when using the keyboard.
I attempted to "fix" the problem by using a second 20X2 to read the serial output from the first, and write it into a register (scratchpad) for the NXT to read using I2C. Again, no go. The PICAXE doesn't work at all as an I2C slave (it's like it isn't even physically connected).
I know that the keyboard and two 20X2's were drawing a lot of power (seemed to be too much for a 7805), so I diverted to using the 7805 for the PICAXE's, and a 25 amp (yes it is regulated 5V) supply for the keyboard (I know it is way overkill, but that's all I have at the moment). Now I know for SURE lack of power isn't an issue.
Why does the 20X2 totally fail as an I2C slave whenever I use the KBIN or SERIN commands, and seemingly only then? I2C works fine when I use the SEROUT command.
I have made working I2C code for both the 20X2, and the NXT, so they can "talk" (NXT is the master).
I have also made a program for the 20X2 that successfully gets key strokes (I know it is successful, as I have it send the data over serial to a computer terminal program).
The problem, is that the PICAXE won't do both, I2C and KB commands. It works fine for either one, but totally fails as an I2C slave when using the keyboard.
I attempted to "fix" the problem by using a second 20X2 to read the serial output from the first, and write it into a register (scratchpad) for the NXT to read using I2C. Again, no go. The PICAXE doesn't work at all as an I2C slave (it's like it isn't even physically connected).
I know that the keyboard and two 20X2's were drawing a lot of power (seemed to be too much for a 7805), so I diverted to using the 7805 for the PICAXE's, and a 25 amp (yes it is regulated 5V) supply for the keyboard (I know it is way overkill, but that's all I have at the moment). Now I know for SURE lack of power isn't an issue.
Why does the 20X2 totally fail as an I2C slave whenever I use the KBIN or SERIN commands, and seemingly only then? I2C works fine when I use the SEROUT command.