Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ivan_law80

#1
LPC9xx/LPC9xxx / Re: P89LPC9221 FAQ
August 08, 2006, 09:15:31 PM
Hi Frank,

Unfortunately, I don't have a MCB900 programmer and Keil's uVision Development Studio.

I am using PV32 by Franklin Software as my compiler and I have built a circuit same with MCB900.

I tried to program my 89LPC9221 using Flash Magic 3.21 with the following settings:

Baud rate : 7200
Use DTR and RTS to enter ISP mode
Virgin 89LPC9221
None(ISP)
Protect ISP code

The problem is, when i try to program the second time, flash magic show this error message :
Unable to connect at the specified baudrate. Try reducing the baudrate. Reset the hardware into ISP mode again.

Anybody has faced this problem before?

Please advise. Thanks

Regards,
Ivan :D

#2
LPC9xx/LPC9xxx / Re: P89LPC9221 FAQ
August 07, 2006, 07:25:48 PM
Hi Andy,

I have modified my circuit exactly the same with MCB900 provided by Keil website. Now I am able to program my 89LPC9221 using the following configuration:

Baud rate : 7200
Use DTR and RTS to enter ISP mode
Virgin 89LPC9221
None(ISP)
Protect ISP code

The problem is, when i try to program the second time, flash magic show this error message again:
Unable to connect at the specified baudrate. Try reducing the baudrate. Reset the hardware into ISP mode again.

Please advise. Thanks

Regards,
Ivan :)
#3
LPC9xx/LPC9xxx / Re: P89LPC9221 FAQ
August 07, 2006, 12:21:25 AM
Hi Andrew,

The waveform has some difference. I am able to get 3 reset pulse on /RST while VDD is high. However, at the starting point i am not able to get 2 pulse for both VDD and /RST.

I think I know the problem since MAX563 /EN pin will disable RXD only but for my MAX3243 /FORCEOFF will disable both TXD and RXD. Need to replace MAX3243 with MAX563.

While waiting for the missing tranceiver, i am trying to program 89LPC9221 using parallel programmer All-100 by Hi-Lo System. The programming finished successfully to program 89LPC9221-DIP20. However, my program fails to run correctly. The code of my program is as follows, please advise is there is any mistakes in my code:

START:
   CLR   EA      ;DISABLE INTERRUPT   
   MOV   IEN0,#00000000B   
   MOV   IEN1,#00000000B   
   MOV   PCON,#00000000B   
   MOV   PCONA,#00000000B
   MOV   TCON,#00000000B   ;TURN OFF ALL TIMER       
   MOV       TMOD,#00100001B  
   MOV   TAMOD,#00000000B  
   MOV   DIVM,#00000000B   
                MOV   A,TRIM
   ANL   A,#10111111B
   MOV   TRIM,A      
   MOV   SCON,#01010000B   
   MOV   BRGR0,#00H         
   MOV   BRGR1,#30H      
    MOV   BRGCON,#00000011B      
   MOV   IP0,#00010000B   
   MOV   IP0H,#00010010B        
                MOV   IP1,#00000000B          
   MOV   IP1H,#00000000B
   MOV   PT0AD,#00000000B      
   MOV   P0M1,#11111111B   
   MOV   P0M2,#11111111B
   MOV   P1M1,#11011111B        
   MOV   P1M2,#11011111B
   MOV   P3M1,#00000011B    
   MOV   P3M2,#00000011B
   MOV   I2CON,#01000001B         
   ;MOV   RTCCON,#00000000B
   ;MOV   RTCH,#00000000B
   ;MOV   RTCL,#00000000B
   ;MOV   WDCON,#00000000B
   ;MOV   WDL,#00000000B
   ;MOV   WFEED1,#00000000B
   ;MOV   WFEED2,#00000000B
   ;MOV   KBCON,#00000000B   ;DISABLE KEYPAD INTERRUPT
   ;MOV   KBMASK,#00000000B
   ;MOV   KBPATN,#00000000B         
   MOV       TH0,#0FFH      
   MOV       TL0,#0F9H
   MOV   TH1,#0      
   MOV   TL1,#251                      
   CLR   SI
   CLR   CLK
   CLR   LE
   CLR   GCLK
   MOV   A,#SLVADDR
   MOV   DEVADDR,A
   CLR   EX1
   CLR   EX0
   SETB   TR2                     ;START TIMER 2
   SETB   ES                      ;ENABLE SERIAL ISR
   CLR   RI      ;ENABLE RECEIVER
   SETB   TR0      ;START TIMER 0
   SETB   ET0      ;ENABLE TIMER 0 OVERFLOW    SETB   TR1      ;START TIMER 1
   SETB   ET1      ;ENABLE TIMER 1 OVERFLOW    SETB   EI2C      ;ENABLE I2C ISR
   CLR   EX0                    ;DISABLE EXTERNAL ISR 0
   CLR   EX1                     ;DISABLE EXTERNAL ISR 1
   CLR   EKBI      ;DISABLE KEYBOARD ISR
   CLR   EC      ;DISABLE COMPARATOR ISR
   CLR   EB0                     ;DISABLE BROWNOUT DETECTION
   CLR   EWDRT      ;DISABLE WATCHDOG RESET
   SETB   EA                      ;ENABLE INTERRUPT




STENGINE:cpl   p1.7
   cpl   p1.7
   SJMP   STENGINE
                RET
#4
LPC9xx/LPC9xxx / Re: P89LPC9221 FAQ
August 06, 2006, 07:09:02 PM
Hi Andy,

I think we will discuss via this discussion forum.
I have checked my circuit. There are some differences:
In the circuit provided by Keil MCB900, can I replace the transceiver MAX563 with MAX3243? And the PNP transistor PMBTA92 with 2N4403?

Please advise. Thanks.

Regards,
Ivan
#5
LPC9xx/LPC9xxx / P89LPC9221 FAQ
August 04, 2006, 09:48:54 PM
FAQ: P89LPC9221 Programmer Issue

Hello everybody. I am using P89LPC9221 SMD microcontroller. I have built the programmer circuit similar to MCB900 by Keil. I have measured the waveform of /RST and VDD and they appear the same as mentioned in Flash Magic 3.21 datasheet. However, flash magic always give me this error message when I try to program my P89LPC9221:

Unable to connect at the specified baudrate. Try reducing the baudrate. Reset the hardware into ISP mode again.

I have tried all the available baudrates and T1 & T2 combinations but still face the same problem.

What would be the possible errors?

Please advise. Thanks!

Regards,
Ivan