Digi NS9750 User Manual

Page 290

Advertising
background image

P r o g r a m m a b l e t i m e r s

2 6 6

N S 9 7 5 0 H a r d w a r e R e f e r e n c e

//

Examples:

//

//

ew MAJIC_ON_STOP_CMD = 1, @$ucd_rd8, FFF00003

//

//

Defines an On-Stop command that reads the byte at 0xFFF00003 upon

//

stopping.

//

//

ew MAJIC_ON_STOP_CMD = 1, @$ucd_rmw16, 80000000, C00, F00

//

//

Defines an On-Stop command that reads a 16-bit value from 80000000,

//

masks off bits 11..8, sets those bits to 1100, and writes the result

//

back to 80000000.

//

//

ew MAJIC_IDLE_MODE_CMD = 0n250, @$ucd_wr32, 0x40000000, 0n5000

//

//

Defines the Idle-Mode command that writes the 32-bit value 5000 (decimal)

//

to the register at 0x40000000 every 250 milliseconds.

//

//

ew MAJIC_ON_STOP_CMD= 0

//

ew MAJIC_IDLE_MODE_CMD= 0

//

//

Disables the On-Stop and Idle-Mode command descriptors.

//

//

..........................................................................

//

ew $ucd_rd8

= 101

//

8-bit read operation

ew $ucd_rd16

= 102

//

16-bit read operation

ew $ucd_rd32

= 104

//

32-bit read operation

ew $ucd_wr8

= 201

//

8-bit write operation

ew $ucd_wr16

= 202

//

16-bit write operation

ew $ucd_wr32

= 204

//

32-bit write operation

ew $ucd_rmw8

= 301

//

8-bit RdModWr operation

ew $ucd_rmw16

= 302

//

16-bit RdModWr operation

ew $ucd_rmw32

= 304

//

32-bit RdModWr operation

//

//

<eof>

Advertising