Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2100] Re: Problem with DDS

2003-12-03 by microbit

Hi Leon,

To check the value written you need this :

>       ptr = (acc &= 0xFF);    //pointer into table
> 40000168 E20440FF and r4, r4, #0xff

ptr is R4.

>       IOSET = square[ptr] << 8;//output byte to port
> 4000016C E7D43001 ldrb r3, [r4, r1]
> 40000170 E1A03403 mov r3, r3, lsl #0x8
> 40000174 E5803000 str r3, [r0, #0]

The ldrb instruction loads R3 with what R4, offset by R1, points to.
So you need to know what's in R1 to work out the offset, and thus what's
actually
written to IOCLR and IOSET

> I'm not all that familiar with ARM assembler, but it looks about
> right.  I'm using the Rowley tools, which use the GNU compiler.
>
> Leon

Best regards
-- Kris

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.