Tauno Voipio <tauno.voipio@iki.fi.NOSPAM.invalid> wrote in message news:<lFxhc.354$wN1.230@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
8051 serial problems
Started by ●April 21, 2004
Reply by ●April 22, 20042004-04-22
Reply by ●April 22, 20042004-04-22
"Edo Reshef" <edoreshef@hotmail.com> wrote in message news:7a494870.0404220047.647b3f63@posting.google.com...> Tauno Voipio <tauno.voipio@iki.fi.NOSPAM.invalid> wrote in messagenews:<lFxhc.354$wN1.230@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 1That 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
Reply by ●April 22, 20042004-04-22
edoreshef@hotmail.com (Edo Reshef) wrote in message news:<7a494870.0404220047.647b3f63@posting.google.com>...> Tauno Voipio <tauno.voipio@iki.fi.NOSPAM.invalid> wrote in message news:<lFxhc.354$wN1.230@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.0592MhzAre you sure your emulator isn't using an on-board 10Mhz crystal?
Reply by ●April 22, 20042004-04-22
> dingoatemydonut@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!
Reply by ●May 2, 20042004-05-02
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" <edoreshef@hotmail.com> wrote in message news:7a494870.0404221405.237cb752@posting.google.com...> > dingoatemydonut@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!
Reply by ●May 3, 20042004-05-03
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" <edwinb@socal.rr.com> wrote in message news:<PDclc.8896$nn3.3100@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" <edoreshef@hotmail.com> wrote in message > news:7a494870.0404221405.237cb752@posting.google.com... > > > dingoatemydonut@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!