Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Q about C for 56800 family

Status
Not open for further replies.

djolestojic

Member level 5
Member level 5
Joined
Dec 9, 2001
Messages
85
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
508
How can one write/read peripheral registers in DSP56800 family, by using only C instructions.

θχαηκΣ
 

You have to define all registers as pointers at tehe begining of the C code, for exameple:

#define SCRRX (int*)0xFFD4 //; SSI Receive Control Register
#define SCRTX (int*)0xFFD3 //; SSI Transmit Control Register
#define SCR2 (int*)0xFFD2 //; SSI Control Register 2
#define STX (int*)0xFFD0 //; SSI Transmit Register
#define SRX (int*)0xFFD0 //; SSI Receive Register
#define SSR (int*)0xFFD1 //; SSI status register

And to read or write the register you have to refer to itself like:

*SCRRX = 0x6F04; //PSR=0, WL=3, DC=15, PM=4
*SCRTX = 0x6F04; // PSR=0, WL=3, DC=15, PM=4


hope it may help...
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top