| Author |
Message |
|
squiggy
Rookie
Joined: Fri Apr 20, 2007 3:22 am Posts: 36
|
Well, if those pins are grounded you're ok. You can test that with a continuity detector. I had to add solder. It's possible they changed their design though. They changed from the PCF8574 to the PCF8574A without changing their documentation.
|
| Thu Jun 19, 2008 2:49 am |
|
 |
|
docilio
Expert
Joined: Sun Sep 09, 2007 10:12 am Posts: 116
|
Input... my problem is that i only got the PCF8574, not all that circuit...
i will try it any way... code and idea...
Thanks
|
| Thu Jun 19, 2008 5:55 am |
|
 |
|
docilio
Expert
Joined: Sun Sep 09, 2007 10:12 am Posts: 116
|
I have conections like these:
G |01......16| VDD (5V)
G |02......15| Resistor to 5V and SCL from NXT
G |03......14| Resistor to 5V and SDA from NXT
Switch |04......13|
|05......12|
|06......11|
|07......10|
G |08......09|
This works with 04 pin (the code 0xFF)
what codes should i use to 05 to 07, and 09 to 12
what msg should i send to light a led on in another place?
|
| Thu Jun 19, 2008 7:02 am |
|
 |
|
squiggy
Rookie
Joined: Fri Apr 20, 2007 3:22 am Posts: 36
|
So take a look at your chip, is it labeled
1. PCF8574
2. PCF8574A
?
There's a difference in the base address
The PCF8574A is 0x70
The PCF8574 is 0x40
If you have the PCF8574 the header file of the sample code I gave would need to be changed to
Pins A0-A2 would be connected to your ground.
|
| Thu Jun 19, 2008 4:41 pm |
|
 |
|
docilio
Expert
Joined: Sun Sep 09, 2007 10:12 am Posts: 116
|
PCF8574AN
not working... =(
|
| Thu Jun 19, 2008 6:15 pm |
|
 |
|
squiggy
Rookie
Joined: Fri Apr 20, 2007 3:22 am Posts: 36
|
OK,
so Im not sure which address you would have, I suspect ox70, but first you need to check to see if the device is working.
try using from the sample programs:
NXT Scan All I2C Add.c
It should tell you if it's working or not.
|
| Thu Jun 19, 2008 6:58 pm |
|
 |
|
docilio
Expert
Joined: Sun Sep 09, 2007 10:12 am Posts: 116
|
hi all
in Input mode, everything working now...
a few questions...:
how to get ask a singular bit? (know if P0 is 0 or 1)
how to set a port as 0 or as 1 ? (Output)...
I wanna light a led on P1, how to control it?
I don't know what to send on "write to" function
Thanks
|
| Thu Jul 03, 2008 3:51 pm |
|
 |
|
docilio
Expert
Joined: Sun Sep 09, 2007 10:12 am Posts: 116
|
Hi, i saw the code of that, but as it is explained in german, i didn't understand what codes use to the OUTputs
|
| Thu Jul 03, 2008 3:58 pm |
|
 |
|
docilio
Expert
Joined: Sun Sep 09, 2007 10:12 am Posts: 116
|
I did it =)
I Finally did it =)
Sorry about all problems that i give to you,
Now i can put a LDR, 2 Leds, and 2 Buttons...
I will later on try put some old SRF-04 working on that PCF...
|
| Thu Jul 03, 2008 6:51 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 7 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|