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

Also BTW, I think you need to mask off the other bits on I/O
(D0-D7, D16-D31), especially with the write to IOCLR.

I've actually been thinking of a boolean macro that turns IOSET,IOCLR into 
"one port", where you just write a zero or a one to the macro to set/clear
IO pins, and it does the 1 bit writing to CLR or SET for you.

-- Kris



----- Original Message ----- 
From: "microbit" <microbit@...>
To: <lpc2100@yahoogroups.com>
Sent: Wednesday, December 03, 2003 11:54 PM
Subject: Re: [lpc2100] Re: Problem with DDS


> 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
> 
> 
>       Yahoo! Groups Sponsor 
>      
>      
> 
> To unsubscribe from this group, send an email to:
> lpc2100-unsubscribe@yahoogroups.com
> 
> 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
>

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.