not working spi
#1
Posted 06 December 2011 - 01:07 AM
#2
Posted 06 December 2011 - 06:32 AM
#3
Posted 06 December 2011 - 07:51 AM
// SID: D11 (SPI MOSI) 14 lcd36 // SCLK: D13 (SPI CLK) 16 lcd37 // A0: D7 (Data / Command) 17 lcd38 // /RST: D4 18 lcd40 // /CS: D10 (SPI CS), D8 if D10 used for SD Card CS 19 lcd39 // public static AdaFruit7565 lcd = new AdaFruit7565(Pins.GPIO_PIN_D7, Pins.GPIO_PIN_D4, Pins.GPIO_PIN_D10, speedKHz: 21000); SPI working with netduino public static AdaFruit7565 lcd = new AdaFruit7565(Pins.GPIO_PIN_17, Pins.GPIO_PIN_18, Pins.GPIO_PIN_20, speedKHz: 21000); SPI not working with netduini mini
Edited by Stefan, 06 December 2011 - 08:39 AM.
Added [code]-tags
#4
Posted 06 December 2011 - 08:18 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#5
Posted 06 December 2011 - 08:21 AM
public AdaFruitSSD1306(Cpu.Pin dc, Cpu.Pin reset, Cpu.Pin chipSelect, SPI.SPI_module spiModule = SPI.SPI_module.SPI1, uint speedKHz = 10000) { AutoRefreshScreen = false; var spiConfig = new SPI.Configuration( SPI_mod: spiModule, ChipSelect_Port: chipSelect, ChipSelect_ActiveState: false, ChipSelect_SetupTime: 0, ChipSelect_HoldTime: 0, Clock_IdleState: false, Clock_Edge: true, Clock_RateKHz: speedKHz ); Spi = new SPI(spiConfig); dcPin = new OutputPort(dc, false); resetPin = new OutputPort(reset, false); }
I have pins set correctly for netduino mini?
Edited by Stefan, 06 December 2011 - 08:39 AM.
Added code tags
#6
Posted 06 December 2011 - 08:39 AM
I see one thing that's not right:
public AdaFruitSSD1306(Cpu.Pin dc, Cpu.Pin reset, Cpu.Pin chipSelect, SPI.SPI_module spiModule = SPI.SPI_module.SPI1, uint speedKHz = 10000)The constructor has 5 parameters.
You define:
public static AdaFruit7565 lcd = new AdaFruit7565(Pins.GPIO_PIN_17, Pins.GPIO_PIN_18, Pins.GPIO_PIN_20, speedKHz: 21000);with 4 parameters.
But I think you posted the wrong class? Since the name is also slightly different (AdaFruit7565 versus AdaFruitSSD1306)
Could it be you're using this library? http://netduinohelpers.codeplex.com/
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#7
Posted 06 December 2011 - 08:54 AM
#8
Posted 06 December 2011 - 09:09 AM
All Netduinos currently output 3V3 on digital signals. But the Mini doesn't have a 3V3 pin. It's power pin outputs 5V for some reason. I normally use a low drop voltage regulator to get my own 3V3 connector.on mini is spi 3.3v or 5v?
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#9
Posted 06 December 2011 - 09:24 AM
#10
Posted 06 December 2011 - 09:26 AM
Hard to tell, I don't have that display to reproduce the issue. But try setting the speed to 10000.What is the difference between a netduino netduinomini? Why it works for netduino and the mini is not it?
It can happen at higher speeds that the result gets unpredictable. Other things (like the voltage or amperage) could make a difference then.
And how have you connected the device to the Mini's SPI-bus?
Netduino pin D11 == Netduino Mini pin 14
Netduino pin D12 == Netduino Mini pin 15
Netduino pin D13 == Netduino Mini pin 16
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#11
Posted 06 December 2011 - 09:26 AM
The Netduino Mini is pin-compatible with Parallax BASIC Stamp 2 modules.But the Mini doesn't have a 3V3 pin. It's power pin outputs 5V for some reason.
#12
Posted 06 December 2011 - 09:30 AM
Thats some good reasonThe Netduino Mini is pin-compatible with Parallax BASIC Stamp 2 modules.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#13
Posted 06 December 2011 - 10:00 AM
#14
Posted 06 December 2011 - 10:17 AM
#15
Posted 06 December 2011 - 10:53 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#16
Posted 06 December 2011 - 10:59 AM
#17
Posted 06 December 2011 - 12:46 PM
#18
Posted 06 December 2011 - 04:34 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users