I'm having problems with the SDA part of an IIC implementation in a AMD 22V
10C (not from China!). I can Output data, to the SDA output, but I'm not ab le to read the SDA input! My CUPL equations, as a whole, compile OK using W INCUPL and the .JED file programs OK.These are the intermediate declarations:
SCLL = FCD7 & !BnWR & !D6 ; SDAH = FCD7 & !BnWR & D7 ; SDAL = FCD7 & !BnWR & !D7 ;
These are the outputs associated with SDA I/O:
/
- SDA I/O pin */
This is the equation for the SDA output control latch and sets the SDA outp ut Low when needed. This sections works just fine.
rite FCD7 with D7=H */
FCD7 with D7=0 */
This is the SDA output pin. Pulled high, externally, with a 4K7 resistor. W orks as an output just fine.
output required */
output enabled */
This is the problem pin.
o D7 output on read of FCD7 */
If I toggle the SDAOE latch I can read its state through D7 e.g. I can read SDA output, however, if I set the SDAOE latch High, ready for read of the SDA INPUT, I can't then read the input - I just read a High value on D7. I t seems that the path from the SDA pin through to the & array isn't there!
Anybody have any clues to what's going wrong? Thanks . . . Dave H.