Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | 8051 serial problems

There are 16 messages in this thread.

You are currently looking at messages 10 to 16.

Re: 8051 serial problems - Edo Reshef - 04:47 22-04-04

Tauno Voipio <t...@iki.fi.NOSPAM.invalid> wrote in message
news:<lFxhc.354$w...@read3.inet.fi>...
> This has a strong scent of a speed / distorsion error. It seems that
> after 6 bits, the 8051 is off by one bit time.
> 
> Please remember that initially the RS-232 standard limited the transfer
> speed to 20000 bits/s. There may be edge slow-down capacitors at either
> or both ends of the RS-232 data lines.

No wonder computers never work!

> Which crystal and what divisor are you using on the 8051's?

I'm using 11.0592Mhz
And that the Init code:
  MOV     PCON,#80h
  MOV     SCON,#0C8H      ;SET SERIAL PORT TO MODE 3
  MOV     TCON,#01H
  MOV     TMOD,#21H       ;SET TIMER 0 TO MODE 1 - 16 BIT MODE
                          ;AND TIMER 1 TO MODE 2 - AUTO RELOAD MODE
  MOV     TH1,#0FFH       ;SET TIMER 1 TO PRODUCE 57600 BAUD (0FFH) ?
  SETB    TR1             ;START TIMER 1



Re: 8051 serial problems - Tauno Voipio - 07:01 22-04-04

"Edo Reshef" <e...@hotmail.com> wrote in message
news:7...@posting.google.com...
> Tauno Voipio <t...@iki.fi.NOSPAM.invalid> wrote in message
news:<lFxhc.354$w...@read3.inet.fi>...
> > This has a strong scent of a speed / distorsion error. It seems that
> > after 6 bits, the 8051 is off by one bit time.
> >
> > Please remember that initially the RS-232 standard limited the transfer
> > speed to 20000 bits/s. There may be edge slow-down capacitors at either
> > or both ends of the RS-232 data lines.
>
> No wonder computers never work!
>
> > Which crystal and what divisor are you using on the 8051's?
>
> I'm using 11.0592Mhz
> And that the Init code:
>   MOV     PCON,#80h
>   MOV     SCON,#0C8H      ;SET SERIAL PORT TO MODE 3
>   MOV     TCON,#01H
>   MOV     TMOD,#21H       ;SET TIMER 0 TO MODE 1 - 16 BIT MODE
>                           ;AND TIMER 1 TO MODE 2 - AUTO RELOAD MODE
>   MOV     TH1,#0FFH       ;SET TIMER 1 TO PRODUCE 57600 BAUD (0FFH) ?
>   SETB    TR1             ;START TIMER 1

That seems correct.

Can you verify the transmission rate with an oscilloscope
(17.36 us / bit)?

Also, please check the signal edges on the RS-232 lines.

Tauno Voipio
tauno voipio @ iki fi





Re: 8051 serial problems - Dingo - 12:27 22-04-04

e...@hotmail.com (Edo Reshef) wrote in message
news:<7...@posting.google.com>...
> Tauno Voipio <t...@iki.fi.NOSPAM.invalid> wrote in message
news:<lFxhc.354$w...@read3.inet.fi>...
> > This has a strong scent of a speed / distorsion error. It seems that
> > after 6 bits, the 8051 is off by one bit time.
> > 
> > Please remember that initially the RS-232 standard limited the transfer
> > speed to 20000 bits/s. There may be edge slow-down capacitors at either
> > or both ends of the RS-232 data lines.
> 
> No wonder computers never work!
> 
> > Which crystal and what divisor are you using on the 8051's?
> 
> I'm using 11.0592Mhz

Are you sure your emulator isn't using an on-board 10Mhz crystal?

Re: 8051 serial problems - Edo Reshef - 18:05 22-04-04

> d...@aol.com (Dingo) wrote:
> Are you sure your emulator isn't using an on-board 10Mhz crystal?

That's actually my main suspicion, I think the Ceibo DS-51 could have
an Internal clock that runs at 12Mhz, DS-51 documentation says nothing
about it. Anyway I will to physically look for crystal in the emulator
in few dayz since it's weekend here... I'll keep you updated!

Re: 8051 serial problems - Edwin Bland - 16:13 02-05-04

Hi,

My Ceibo emulator came with a default 24.0 Mhz crystal.  It has divider
jumpers... with the default being at 12.0 Mhz.  I had to get another the
crystal to get nonmultiple frequencies.

Edwin

"Edo Reshef" <e...@hotmail.com> wrote in message
news:7...@posting.google.com...
> > d...@aol.com (Dingo) wrote:
> > Are you sure your emulator isn't using an on-board 10Mhz crystal?
>
> That's actually my main suspicion, I think the Ceibo DS-51 could have
> an Internal clock that runs at 12Mhz, DS-51 documentation says nothing
> about it. Anyway I will to physically look for crystal in the emulator
> in few dayz since it's weekend here... I'll keep you updated!



Re: 8051 serial problems - Edo Reshef - 18:42 03-05-04

Problem Solved!
Ceibo manual doesn't say anything about it, but you can choose
External OR Internal clocking inside the device. Thanks to everyone
here I opened the emulator and found a crystal! I changed it and it
works perfect.
I changed 12.0mhz crystal with 11.0592mhz - exactly 10% difference!
Nice one!
I'm actually quite impressed from the skills people showed around, I
guess I have lots to learn.

Really thanks guys, you helped a lot!


"Edwin Bland" <e...@socal.rr.com> wrote in message
news:<PDclc.8896$n...@twister.socal.rr.com>...
> Hi,
> 
> My Ceibo emulator came with a default 24.0 Mhz crystal.  It has divider
> jumpers... with the default being at 12.0 Mhz.  I had to get another the
> crystal to get nonmultiple frequencies.
> 
> Edwin
> 
> "Edo Reshef" <e...@hotmail.com> wrote in message
> news:7...@posting.google.com...
> > > d...@aol.com (Dingo) wrote:
> > > Are you sure your emulator isn't using an on-board 10Mhz crystal?
> >
> > That's actually my main suspicion, I think the Ceibo DS-51 could have
> > an Internal clock that runs at 12Mhz, DS-51 documentation says nothing
> > about it. Anyway I will to physically look for crystal in the emulator
> > in few dayz since it's weekend here... I'll keep you updated!

previous | 1 | 2