SPI bus to External Output Pin ASM code

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
dswheeley
Posts: 10
Joined: Tue Mar 20, 2012 9:35 am
Contact:

SPI bus to External Output Pin ASM code

Post by dswheeley »

Hi all

Not a great ASM coder, I have some existing ASM code from a PIC application note, but I need to access some of the data on the SPI bus on an external PIN, any thoughts on how to do this.

Any help would be greatly appreciated

Best Regards

Darren

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SPI bus to External Output Pin ASM code

Post by Benj »

Hi Darren,

Any chance you can use the SPI component in Flowcode? This should provide you with master SPI functionality without having to resort to assembler. You then simply need to use an output icon in single bit mode to control the CS signal and the SPI component macros to shift the data in or out.

dswheeley
Posts: 10
Joined: Tue Mar 20, 2012 9:35 am
Contact:

Re: SPI bus to External Output Pin ASM code

Post by dswheeley »

Hi Ben,
Many thanks for that I will certainly try that and see if it works, we do have working ASM code that compiles but internal values are passed via the SPI bus we just need to bring this out to an external pin, sounds simple...:)

Best Regards

Darren

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SPI bus to External Output Pin ASM code

Post by Benj »

Hi Darren,

There are some examples of using assembler code inside Flowcode here.
http://www.matrixmultimedia.com/mmforum ... f=5&t=3230

Post Reply