Hi,
When controlling SPI on a PIC an address is used, I follow this example from the Oshonsoft manual:
When connecting a 5110 module, which doesn't have addresses, how do I write an Oshonsoft program using one?
Camerart.
Hi E,
OK, that's good, thanks.
I'm trying to write a function, taken from a previous program, here it is not working in the attached program. I've got in a tangle.
C.
hi C,
Try these options, note maximum of 5 args.!
I have not studied the 5110 but I would have thought you need to somehow address a register with the SPI befor loading the command/data.???
In the FUNCTION/PROC you should have
SPISend arg1
SPISend arg2 ''
etc.........
I have not studied the 5110 but I would have thought you need to somehow address a register with the SPI befor loading the command/data.???
Hi E,
I'm not sure, as I'm copying an existing program into Oshonsoft.
I tried various combinations and this works on the Oshonsoft Oscilloscope.
Thanks.
C.
hi C,
If you check your scope image it appears that every other block of clock pulses is carrying no data.??
The SPIPrepare should be part of the main code, not be within the Proc.
Try it.
E
hi C,
If you check your scope image it appears that every other block of clock pulses is carrying no data.??
The SPIPrepare should be part of the main code, not be within the Proc.
Try it.
E
hi C,
Checking your program it will not work as you expect, partly due to Osh.
Look at this alternative using Const, much tidier, also Osh is happy using names in Proc/Func
Run it twice, once as Write and another as Read
I have assumed an address method of 0x01, but as said, I have not studied the 5110
5110 uses oneway SPI , only spi clock and sdo are needed.
Spi address is not used.
Addionally from PIC: D/C , reset, chip select.
I am not sure, but probably chip select can be constantly on.