Hello all,
My previous programming has only been Arduino and PIC assembler, I am completely new to mbed and I have some problems, I cant get it to display anything through I2C, it's not even setting it up for 4 lines, if i hook it up in parallel it works.
The I2C address with these pins grounded should be 0x20 and if I run I2C scanner it also shows 0x20.
The board im working with is:
ST NUCLEO-F446RE
http://www.st.com/en/evaluation-tools/nucleo-f446re.html
The I2C I/O expander is this one:
PCF8574 from NXP
http://www.nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf (SO16)
The display is this one:
MC41605
http://www.farnell.com/datasheets/2021730.pdf
The schematic is here, It's how I interpreted the connections from the TextLCD_Config.h for the PCF8574
Here's my code
include the mbed library with this snippet
#include <mbed.h>
#include <TextLCD.h>
//Serial communication to PC
//Serial pc (USBTX, USBRX);
//I2C I2C Setup
I2C i2c_lcd (D14, D15); // D14 = SDA, D15 = SCL
//I2C TextLCD Setup
TextLCD_I2C lcd(&i2c_lcd, 0x20, TextLCD::LCD16x4);//LCD16x4, HD44780);
//Variables
//Loop
int main(){
while(1){
// pc.printf("test");
lcd.printf("test test\n");
}
}
I hope some of you guys can help me out.. :)
Hello all,
My previous programming has only been Arduino and PIC assembler, I am completely new to mbed and I have some problems, I cant get it to display anything through I2C, it's not even setting it up for 4 lines, if i hook it up in parallel it works.
The I2C address with these pins grounded should be 0x20 and if I run I2C scanner it also shows 0x20.
The board im working with is:
ST NUCLEO-F446RE http://www.st.com/en/evaluation-tools/nucleo-f446re.html
The I2C I/O expander is this one: PCF8574 from NXP http://www.nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf (SO16)
The display is this one:
MC41605 http://www.farnell.com/datasheets/2021730.pdf
The schematic is here, It's how I interpreted the connections from the TextLCD_Config.h for the PCF8574
Here's my code
include the mbed library with this snippet
I hope some of you guys can help me out.. :)