Main Menu
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

Topics - aldrin

#1
LPC9xx/LPC9xxx / Debug of no_touch935
January 03, 2007, 08:07:48 AM
Hi,

When i execute no_touch with the debugger of uVision I'm watching the dissembler window and i have a dude, When I call the function "lcall PGM_MTP"  of no_touch935, the program go to direction FF03 and in this direction there are these operations:

FF03     RL A
FF04     JMP @A+DPTR

Depends where i have the function of no_touch the DPTR can change, and then the program go to a one site of my code or another site, and the next sentence (pop IEN0) often never it is executed.

I don't know if this is correct, or if i have a mistake in the code.

Because when i program my device and i execute no_touch935 (with a string in UART or other system), i don't know what the device must do.

Thanks. I wish program within problems my device once by all.
#2
LPC9xx/LPC9xxx / Work with 2 P89LPC935
December 12, 2006, 08:01:04 AM
Hello,

I have a problem. I use one Serial of my computer for programing two P89LPC935. Then, I have a board that create the signal of RST (the three pulses), and in this board i have a jumper for transmiting the RST to one or other device.

I wish program one, and after the other. But I can't do this. Always I program both, because both are in ISP mode, but i transmit my RST only a one device, then i don't understand because both are in ISP mode. I think that It is cause of Break Detect, but i'm not sure.

In the code i have put the no_touch935() in this form:

   if (received_char == 'F')
      {
      uart_transmit('F');
      no_touch935();
      }

and the uart_init();

void uart_init(unsigned char address,unsigned char mask)
{
  // configure UART
  // clear SMOD0
  PCON &= ~0x40;
  SCON = 0xB0;
  // set or clear SMOD1
  PCON &= 0x7f;
  PCON |= (0 << 8);
  SSTAT = 0xF1;

  // configure address and mask
  SADDR = address;
  SADEN = mask;

  // enable break detect
  AUXR1 |= 0x40;

  // configure baud rate generator
  BRGCON = 0x00;
  BRGR0 = 0xF0;
  BRGR1 = 0x02;
  BRGCON = 0x03;

  // TxD = push-pull, RxD = input
  P1M1 &= ~0x01;
  P1M2 |= 0x01;
  P1M1 |= 0x02;
  P1M2 &= ~0x02;

  // initially not busy
  mtxbusy = 0;

  // enable uart receive interrupt
  ESR = 1;
  // enable uart transmit interrupt
  EST = 1;

} // uart_init


Then now I am in a point that i don't know how continue for the devices work correct.

My procedure is the following one:




I have lost more P89LPC935, and i'm tired of changing one and one more. Thanks.