I have a Embedded Masted with "Non-TFT version SPI LCD interface"
I have updated the board with the last “GHI Loader” and as reported in your
pdf document the LCD is not supported.
“SPI-Based Displays: Except for CANxtra, EMX firmware does not natively support
SPI-based LCDs (the ones used with the old non-TFT Embedded Master Modules
based devices such as non-TFT Embedded Master Development System), but
users can still use graphics feature and refresh the LCD from the managed code
over SPI bus. GHI is providing a simple example how to accomplish this process.
CANxtra SPI LCD is natively supported.”
Well, The board works fine but I have some problem to drive the SPI2 channel
to manually update the LCD.
As reported in your pdf document I have used the following lines to drive the SPI2
Pin Name Description
12 LCD_RST Default pin for LCD reset
18 LCD_CMD Default pin for LCD command/data select
46 LCD_SSEL (SPI2) LCD salve select
51 LCD_MISO (SPI2) LCD master in slave out (usually not used)
48 LCD_SCK (SPI2) LCD serial clock
49 LCD_MOSI (SPI2) LCD master out slave in
My code is based on your sample named “Graphical128x64Display”,
it’s the code that I wrote:
SPI.Configuration spiconfig = new SPI.Configuration((Cpu.Pin)SelectPin, true, 100, 100, false, true, 1000, SPIModule); _RST = new OutputPort((Cpu.Pin)ResetPin, true); _DC = new OutputPort((Cpu.Pin)CommandPin, true); _spi = new SPI(spiconfig); where: SPIModule is SPI2 SelectPin is 46 ResetPin is 12 CommandPin is 18
when I created the “new SPI(spiconfig)” I got an ArgumentException
If I try the code with SPI1 channel the code work fine
SPIModule is SPI1 SelectPin is 39 ResetPin is 12 CommandPin is 18
Where is my mistake ?
Have you an example to drive the 128x64 LCD with SPI2 to send to me ?