Page 1 of 1

Spi simulation on data scope help

Posted: Mon Jun 09, 2014 10:12 pm
by outlawstc
Trying to get spi component to show up on the data scope..
Data scope loads the channels when the spi component is added to the system panel..
But for some odd reason the data scope does not simulate the data being transmitted..
im only trying to transmit info not recieive in response
Any help would be great.
Thanks

Re: Spi simulation on data scope help

Posted: Tue Jun 10, 2014 10:03 am
by Benj
Hello,

The SPI is driven using the hardware SPI channel or using the software CAL routines. Outputting signals to the scope as part of simulation could be done but the timings might not be very accurate so we have not decided to do this yet.

We have added the SPI channels to the scope window automatically as this helps with using the new Ghost ICT feature on the EB006 which would allow you to see the signals as they are happening on the hardware.

Re: Spi simulation on data scope help

Posted: Tue Jun 10, 2014 1:26 pm
by outlawstc
Oh ok gotcha.
On a side note i spent a while yesterday trying to get the SPI to work on the arduino uno..
For some odd reason when you have it set to a CH it does not work. but when you set it to software it does..
Isnt CH setting preset choices for the pins used to match the pins that the micro controller has SPI built in on..
While software setting is using extra programming on the chip to set up other non built in SPI pins to work as another SPI channel?

Whats the difference in Channel 1 and software??

Thanks

Re: Spi simulation on data scope help

Posted: Tue Jun 10, 2014 8:39 pm
by Benj
Hello,

Channel 1 relates to the on board SPI peripheral and associated pins. The software mode uses a software bit bang routine to manually perform the SPI protocol on any I/O pins.

As your using an AVR there is an issue with the hardware SPI CS pin. If the pin is configured as an input (default) and read as low then it triggers the SPI slave functionality and can lock the processor from performing the SPI master routines. If you output a logic 0 or 1 to the hardware CS pin before you initialise the SPI component or tie the pin high with a pull up resistor then it should get rid of the problem.

Re: Spi simulation on data scope help

Posted: Wed Jun 11, 2014 8:49 pm
by outlawstc
Ben,

I tried what you said and it worked with getting channel one operable

Another thing I think i should mention is for some reason one of the settings for spi seems backwards

the clock phase trailing and leading edge selection..

when you set it to leading edge it writes binary on the falling edge when you set it to trailing edge it writes binary on the leading edge of the clock..

i would think clock phase leading edge should write the 1 or 0 state on the rising pulse of the clock.. am i understanding this wrong or does the flowcode software have a bug?

Thanks