User`s guide
Getting Started with Automation Interface
c Verify that the PC register contains the value you wrote.
cc.regread('PC','binary')
C6xxx processor family — regread and regwrite let you access the
processor registers directly. Enter the following com mands to get da ta into
and out of the A0 and B2 registers on your processor.
a To retrieve the value in register A0 and store it in a variable in your
MATLAB workspace. Enter the following command:
treg = cc.regread('A0','2scomp');
treg
contains the two’s complement representation of the value in A0.
b To retrieve the value in register B2 as an unsigned binary integer, enter
the following command:
cc.regread('B2','binary');
c Next, enter the following command to use regwrite to put the value in
treg into register A2.
cc.regwrite('A2',treg,'2scomp');
CCS IDE reports that A 0, B2, and A2 have the v alues you expect. Select
View > CPU Regist er s > Core Re g iste rs from the CCS IDE menu
bar to list the processor registers.
Closing the Links or Cleaning Up CCS IDE
Objects that you create in Embedded IDE Link CC softwa re have CO M
handles to CCS. Until you d elete these handles, the CCS process (
cc_app.exe
in the Microsoft Windows Task Manager) remains in memory. Closing
MATLAB software removes these COM handles, but there may be times when
you w ant to delete the handles without closing the application.
Use
clear to remove objects from your MATLAB w orkspace and to delete
handles they contain.
clear all deletes everything inyourworkspace. To
retain your MATLAB software data while deleting objects and handles, use
clear objname. This applies both to ticcs objects your create w ith ticcs
and other object you create with createobj. To remove the objects created
2-19