??? 05/10/07 16:48 Modified: 05/10/07 16:57 Read: times |
#138998 - lpc935 and mcb900. Am I missing something? |
Hi.
I've just started trying to get some experience with the LPC series, so having read a few threads here & at the flashmagic forum I decided I needed an MCB900, which I purchased. First off I ran Blinky from the Keil uVision evaluation ide, which downloads via flashmagic and works fine. All good so far. I then wrote some assembler (see below), assembled it into a hex file and downloaded that, but it doesn't run (no blink on P2.0). If I re-assemble for an Atmel (changing the include file) it runs fine on my Atmel evaluation board. The 935 is configured for internal clock, and the watchdog is disabled. I feel like I'm missing something. Any suggestions much appreciated. ;************************************ ; LPC935 baby steps ; 10/05/2007 ; ;************************************ ; Primary controls $NOMOD $TITLE(BYTE 935 Test) $PAGEWIDTH(132) $DEBUG $OBJECT $NOPAGING ;************************************ ; ; Variable declarations and equates. ; ;************************************ $include(C:\asm51\LPC935.inc) ;includes for LPC935 T1COUNT Data 30h ;Timer 1 count ALARM1 Bit 01h ;Flag for timer 0 set in timer 0 interrupt org 00H cseg ljmp INIT org 001Bh ljmp T1_INTERRUPT INIT: setb P2.0 MAIN: START_50MS_TIMER #20h ;Delay for Delay_time * .05 seconds jnb Alarm1, $ cpl P2.0 ljmp main ;************************************ ; ; Subroutines ; ;************************************ ;++++++++++++++++++++++++++++++++++++ ; ; ; Timer1 interrupt. Timer 1 used for multiples of .05 seconds. T1_INTERRUPT: mov TH1,#03CH mov TL1,#0B0H djnz T1COUNT,T1_EXIT ;If we haven't reached 0 then jump out of int routine setb ALARM1 clr ET1 ;stop timer clr TR1 T1_EXIT: reti ; ; End of Timer1 interrupt ;++++++++++++++++++++++++++++++++++++ ;++++++++++++++++++++++++++++++++++++ ; ; Macros ; ;++++++++++++++++++++++++++++++++++++ START_50MS_TIMER MACRO FIFTY_MS_INTERVALS ;FIFTY_MS_INTERVALS is the ;number of .05 second ;intervals to wait for clr ET1 clr alarm1 orl TMOD,#10h ;Set timer 1 to 16-bit mode mov TH1,#0B0H mov TL1,#03CH ;Initialize TL1 to overflow every .05 seconds setb ET1 ;Enable timer interrupt 1 setb EA ;Enable all interrupts mov T1COUNT, FIFTY_MS_INTERVALS ;Example - Set T1COUNT to 20 to wait for 1s setb TR1 ;Turn timer 1 on ENDM ;++++++++++++++++++++++++++++++++++++ ; ; End of Macros ; ;++++++++++++++++++++++++++++++++++++ END |
Topic | Author | Date |
lpc935 and mcb900. Am I missing something? | 01/01/70 00:00 | |
put the MACRO at the top | 01/01/70 00:00 | |
Thanks... | 01/01/70 00:00 | |
where is it going to come from | 01/01/70 00:00 | |
How can I check? | 01/01/70 00:00 | |
Does flashmagic have a buffer? | 01/01/70 00:00 | |
is the oscillator running (enable clkout and scope | 01/01/70 00:00 | |
Thanks guys. | 01/01/70 00:00 | |
LPC9xx | 01/01/70 00:00 | |
Answers | 01/01/70 00:00 | |
Ah. Input only. | 01/01/70 00:00 | |
LPC900 - A differnet animal | 01/01/70 00:00 | |
Thanks Joe. | 01/01/70 00:00 | |
UCFG1 | 01/01/70 00:00 | |
Code Architect | 01/01/70 00:00 | |
Thanks again![]() | 01/01/70 00:00 |