Hello,
I wrote this topic another section. But maybe this is a bug. I wanted to write here again.
I have a problem with BusInOut. My codes are as below.
I have two buses ( 5 bit. cRowBus and cColBus). I made them opendrain output. p29 didn't work, when I tried the first code. (I measure 111101 on cColBus pins, when I write to bus as cColBus.write(63); (111111). p29 was always zero.) I tryed this two codes on two mbed. Both of them were same. After, I tried the second code. (I just canceled cRowBus). It works fine. Can you try these codes on own mbed 1768? What could be the reason for this?
Thanks,
Selim.
1. code:
#include "mbed.h"
BusInOut cRowBus(p5, p8, p10, p6, p9, p7);
BusInOut cColBus(p25, p26, p27, p28, p29, p30);
unsigned char x;
main(){
cColBus.mode(OpenDrain);
cColBus.output();
cRowBus.mode(OpenDrain);
cRowBus.output();
while(1) {
cColBus.write(63);
wait_ms(500);
cColBus.write(0);
wait_ms(500);
}
}
2. code :
#include "mbed.h"
//BusInOut cRowBus(p5, p8, p10, p6, p9, p7);
BusInOut cColBus(p25, p26, p27, p28, p29, p30);
unsigned char x;
main(){
cColBus.mode(OpenDrain);
cColBus.output();
// cRowBus.mode(OpenDrain);
// cRowBus.output();
while(1) {
cColBus.write(63);
wait_ms(500);
cColBus.write(0);
wait_ms(500);
}
}
Hello,
I wrote this topic another section. But maybe this is a bug. I wanted to write here again.
I have a problem with BusInOut. My codes are as below.
I have two buses ( 5 bit. cRowBus and cColBus). I made them opendrain output. p29 didn't work, when I tried the first code. (I measure 111101 on cColBus pins, when I write to bus as cColBus.write(63); (111111). p29 was always zero.) I tryed this two codes on two mbed. Both of them were same. After, I tried the second code. (I just canceled cRowBus). It works fine. Can you try these codes on own mbed 1768? What could be the reason for this?
Thanks,
Selim.