Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-30 Thread Maarten Brock
> On 29.12.2016 23:16, Maarten Brock wrote: >> >> These values get you a 453 baudrate: >> 24.5MHz / 8 / (256-45) / 32 = 453 >> >> 300 baud is really low and impossible to achieve with T1 in 8-bit >> autoreload. Most USB-UARTs even have this as their lower level limit. > > > > The 43 in the posted e

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-30 Thread Philipp Klaus Krause
On 29.12.2016 23:16, Maarten Brock wrote: > > These values get you a 453 baudrate: > 24.5MHz / 8 / (256-45) / 32 = 453 > > 300 baud is really low and impossible to achieve with T1 in 8-bit > autoreload. Most USB-UARTs even have this as their lower level limit. The 43 in the posted example was

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-29 Thread Maarten Brock
> While LED blinking and timer interrupts re working now, I wasn't able to > get serial I/O to work yet. I only see garbage (all received bytes are > either 0x00 or 0x80). > I tried to port my "Hello, world!" that I already got working for many > other mcs51 variants: > > #include > > #include >

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-29 Thread Philipp Klaus Krause
It seems the tolerances in baudrate variation are quite low in the board / serial converter combination used. I wasn't able to get the UART working at the default SYSCLK, not even at 300 baud (1.54% deviation in baudrate). Using a 24.5 Mhz SYSCLK, it works fine at 300 baud (0.15% deviation in baudr

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-29 Thread Philipp Klaus Krause
While LED blinking and timer interrupts re working now, I wasn't able to get serial I/O to work yet. I only see garbage (all received bytes are either 0x00 or 0x80). I tried to port my "Hello, world!" that I already got working for many other mcs51 variants: #include #include int putchar(int c

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-27 Thread Philipp Klaus Krause
On 27.12.2016 11:49, Maarten Brock wrote: >> On 26.12.2016 22:20, Maarten Brock wrote: >>> Further, if you don't use our c8051f120.h> you will have to define >>> _XPAGE yourself to let the xdata initialization succeed in the future. >> >> Shouldn't the default from crtpagessfr do, since the C8051F1

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-27 Thread Maarten Brock
> On 26.12.2016 22:20, Maarten Brock wrote: >> Further, if you don't use our c8051f120.h> you will have to define >> _XPAGE yourself to let the xdata initialization succeed in the future. > > Shouldn't the default from crtpagessfr do, since the C8051F120 has > _XPAGE at 0xa2? > > Philipp Are you u

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-27 Thread Philipp Klaus Krause
On 26.12.2016 22:20, Maarten Brock wrote: > Further, if you don't use our c8051f120.h> you will have to define _XPAGE > yourself to let the xdata initialization succeed in the future. Shouldn't the default from crtpagessfr do, since the C8051F120 has _XPAGE at 0xa2? Philipp

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-27 Thread Philipp Klaus Krause
On 26.12.2016 22:20, Maarten Brock wrote: > Hi Philipp, > > On what SFRPAGE are P3MDOUT and XBR2 located? Is that also the default? Thanks. The non-default sfr page was the problem. Philipp -- Check out the vibrant tec

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-26 Thread Maarten Brock
Hi Philipp, On what SFRPAGE are P3MDOUT and XBR2 located? Is that also the default? Further, if you don't use our c8051f120.h> you will have to define _XPAGE yourself to let the xdata initialization succeed in the future. Maarten > To look into SDCC mcs51 performance, I wanted to run Whetstone,

Re: [Sdcc-user] Getting started with C8051F120 problem

2016-12-26 Thread Philipp Klaus Krause
On 26.12.2016 14:54, Philipp Klaus Krause wrote: > The same cables and U-EC6 debug adapter clone work fine with the > C8051F020 board. > > Philipp To flash the C8051F120 I use ec2writeflash --port USB, just like with the C8051F020 board. ec2writeflash recognizes the C8051F120 as C8051F120. Phili