Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 28044

Re: SPI and I2C code examples for ADuC84x?

$
0
0

We have some basic examples written in assembly coming along with the Evaluation-CD.

Sorry nothing in C.

But the examples are very small and straight forward and can be easily transferred to C by a SW engineer.


The main point is how to configure the SFRs – this can be seen in the assembly examples easily.

Here an example for a SPI Master configuration:

 

; CONFIGURE SPI...

MOV     SPICON,#037h    ; configure SPI port for:

                                             ; Fosc/16, CPHA=1, CPOL=0, master

MOV     IEIP2,#1               ; enable SPI interrupt

 

Hope that helps.


Viewing all articles
Browse latest Browse all 28044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>