Author Topic: serial communication  (Read 7264 times)

harsha

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
    • Email
serial communication
« on: April 17, 2008, 10:57:34 am »
I am trying to communicate with my hardware using P89V51RD2 microcontroller. when i send the inputs using matlab, it doesn't waits for the input, instead it starts executing the rest of the code..

the code can be something like this, this is a test code where i am sending inputs from my pc which will be displayed on the LEDs connected to port1:

.org 0h
MOV TMOD, H'20 ; timer 1 in mode 1 8 bit autoreload
MOV TH1, h'fd; 9600 baud rate
MOV SCON, H'50; 8-bit 1 stop bit
SETB TR1
clr ri
rpt: jnb ri, rpt
mov a, sbuf
mov p1, a
.end

do i need to consider something else?

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: serial communication
« Reply #1 on: April 19, 2008, 08:42:39 am »
As this is not a FlashMagic related issue, you better post it on 8052.com's Forum for help.

You also are should post a really tried code, presenting your findings and also how they fall short of your expectations.

Jan Waclawek