Author Topic: A fairly simple 8051-based SBC project.  (Read 12344 times)

0 Members and 1 Guest are viewing this topic.

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
A fairly simple 8051-based SBC project.
« on: December 03, 2016, 10:47:03 pm »
Here is the features I shot for on this project:

* 8051-compatible processor: AT89C51RC @ 24MHz
* Von Neumann connected system bus
* 32kB EEPROM, 32kB SRAM (0x0000 - 0x7fff = AT28C256, 0x8000 - 0xffff = IS61C256)
* PIC16F1455 for USB virtual serial port and system control (including reset)
* Serial 128x64 graphic display (ST7920 controller, contains built-in character generator)
* PS/2 interface for keyboard
* DS1307 RTC
* Buzzer
* Fully through hole construction
* Board size identical to the LCD display module

How do you guys think?

I found PIC16F1455. Here is the (almost) complete BOM:

* 1x AT89C51RC-24PU
* 1x SN74HC00N
* 1x SN74HC573N
* 1x IS61C256AH-15N
* 1x AT28C256-15PC
* 1x PIC16F1455-I/P
* 1x DS1307N
* 1x ST7920-based LCD module
* 1x USB Mini-B connector
* 1x PS/2 connector
* 2x 22 \$\Omega\$ resistors
* 2x 4.7k \$\Omega\$ resistors
* 7x 220nF MLCC
* 2x 22nF ceramic disk capacitor
* 1x 16MHz HC-49/S crystal (12MHz will work too, with different fuse settings in the PIC though)
* 1x 32768Hz warch crystal
* 1x buzzer
* 1x SS9015 PNP BJT
* 1x 2N7000 NMOSFET

The PIC16F1455 generates the 24MHz clock for 8051 from its internal 48MHz clock, provides USB CDC, and handles switching the 8051 between internal ROM and external ROM booting.
« Last Edit: December 07, 2016, 01:02:25 pm by technix »
 

Offline ChristofferB

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: dk
  • Chemistry phd student!
    • My channel:
Re: A fairly simple 8051-based SBC project.
« Reply #1 on: December 03, 2016, 11:48:23 pm »
Sounds interesting! What code is it going to run? Something BASIC-y?
--Christoffer //IG:Chromatogiraffery
Check out my scientific instruments diy (GC, HPLC, NMR, etc) Channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #2 on: December 04, 2016, 08:30:35 am »
Sounds interesting! What code is it going to run? Something BASIC-y?
I have not figured out what code I should make it run yet. The wiring along with the 32kB internal ROM in the chip allows me to go both ways. My original plan was to run native code only, using the internal ROM as a bootloader, and store actual application code in the external EEPROM. If I ended up running BASIC, the interpreter and OS will have to sit in the internal ROM while the external ROM is used as a filesystem of sorts.
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: A fairly simple 8051-based SBC project.
« Reply #3 on: December 04, 2016, 10:26:03 am »
Quote
I may run into sourcing problems as PIC16F1455 is very difficult to hunt down
why? are you planning to do tens of thousands of units? still, usually microchip's lead time is less than 10 weeks
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #4 on: December 04, 2016, 11:22:56 am »
Quote
I may run into sourcing problems as PIC16F1455 is very difficult to hunt down
why? are you planning to do tens of thousands of units? still, usually microchip's lead time is less than 10 weeks
I can't find them in local electronic component stores.
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: A fairly simple 8051-based SBC project.
« Reply #5 on: December 04, 2016, 12:18:22 pm »
fair enough, though i bet ebay or microchip sample program can be of help
still, microchip direct has ton of them and (at least here) 10€ shipping
 

Offline stfsux

  • Contributor
  • Posts: 23
  • Country: 00
Re: A fairly simple 8051-based SBC project.
« Reply #6 on: December 04, 2016, 12:43:34 pm »
* Von Neumann connected system bus
I'm not sure to understand.
i8051 is normally a modified harvard architecture, or are you talking about something else?
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: A fairly simple 8051-based SBC project.
« Reply #7 on: December 04, 2016, 03:51:09 pm »
* PIC16F1455 for USB virtual serial port and system control (including reset)

If you just want a USB serial port, why don't you use those cheap FTDI or similar USB-to-serial modules available on eBay for $1.30? Typically those modules have DTR-signal which can be used for the reset purposes.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #8 on: December 04, 2016, 04:40:56 pm »
* PIC16F1455 for USB virtual serial port and system control (including reset)

If you just want a USB serial port, why don't you use those cheap FTDI or similar USB-to-serial modules available on eBay for $1.30? Typically those modules have DTR-signal which can be used for the reset purposes.
8051 needs external active-high POR  which should be present regardless of the prescence of a USB host, and this chip generates that signal. It also generates the signal intended for the EA pin if I decided to store native code on the EEPROM and use the onboard ROM as a bootloader.  I don't think that a simple USB to serial chip can do all those. In fact the USB interface will have to be a bit more complicated for that.
 

Offline jesuscf

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: ca
Re: A fairly simple 8051-based SBC project.
« Reply #9 on: December 04, 2016, 05:38:37 pm »
Either the AT89LP51RD2 or the AT89LP51ED2 are a much better option than the AT89C51RC.  They both come with 64k of ISP Flash and 2k of RAM.  The ED2 comes with 4k of EEPROM as well.  On top of that you'll get a built-in serial boot loader, a one clock per cycle CPU, and a sometimes usable 10-bit ADC.
Homer: Kids, there's three ways to do things; the right way, the wrong way and the Max Power way!
Bart: Isn't that the wrong way?
Homer: Yeah, but faster!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #10 on: December 04, 2016, 09:30:04 pm »
Either the AT89LP51RD2 or the AT89LP51ED2 are a much better option than the AT89C51RC.  They both come with 64k of ISP Flash and 2k of RAM.  The ED2 comes with 4k of EEPROM as well.  On top of that you'll get a built-in serial boot loader, a one clock per cycle CPU, and a sometimes usable 10-bit ADC.
I cannot source them (similar situation as PIC16F1455 - in fact AT89LP series faces extremely harsh competition from STC equivalents that is much cheaper, so they are even more expensive to find and nigh impossible to find.)

And this design being a dual purpose (running BASIC using interpreter in internal Flash, or running native code directly off the external EEPROM) means the processor must be able to be forced external code and data memory in Von Neumann bus.
« Last Edit: December 05, 2016, 05:41:24 am by technix »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: A fairly simple 8051-based SBC project.
« Reply #11 on: December 05, 2016, 03:40:33 am »
Quote
Quote
Von Neumann connected system bus
I'm not sure to understand.   i8051 is normally a modified harvard architecture
Presumably he means that he's setting up the bus so that external RAM and external Program space share the same bus.  (that probably means that a chip with 64k internal memory is "undesirable", because you'd want to have the flexibility of putting some code in the external memory.   Or do the 64k versions have a provision for turning off internal flash in pieces?)
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: A fairly simple 8051-based SBC project.
« Reply #12 on: December 05, 2016, 06:36:30 am »
I don't know why you want to do this board, it's hard to understand

I would suggest buy this one and you your time for some other stuff like firmware

https://world.taobao.com/item/37792947308.htm?spm=a312a.7700714.0.0.fRMBBX#detail
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #13 on: December 05, 2016, 11:24:55 am »
I don't know why you want to do this board, it's hard to understand

I would suggest buy this one and you your time for some other stuff like firmware

https://world.taobao.com/item/37792947308.htm?spm=a312a.7700714.0.0.fRMBBX#detail
Do that thing get any chance to run BASIC? Does that board also serve as a teaching tool for students learning computer consistency?
 

Offline stfsux

  • Contributor
  • Posts: 23
  • Country: 00
Re: A fairly simple 8051-based SBC project.
« Reply #14 on: December 05, 2016, 12:02:10 pm »
@westfw oh yeah ok. nvm  8)
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: A fairly simple 8051-based SBC project.
« Reply #15 on: December 06, 2016, 06:30:44 am »
For sure, and better than 89C51, that board is only a cheaper, smaller and faster 89C51 also less power from supply
« Last Edit: December 06, 2016, 06:33:45 am by ebclr »
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #16 on: December 06, 2016, 06:34:27 am »
For sure, and better tha 89C51, that board is only a cheaper, smaller and faster 89C51
I have that exact chip. And no it does not work in this design. STC chips does not have the required EA pin.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: A fairly simple 8051-based SBC project.
« Reply #17 on: December 06, 2016, 11:39:24 am »
Chip is not STC

Is silabs

Why external memory, if all memory address are filled up internally



 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #18 on: December 06, 2016, 01:23:23 pm »
Chip is not STC

Is silabs

Why external memory, if all memory address are filled up internally
Can I fill the data into the external memory, and immediately jump into it? I am using a Von Neumann external bus.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: A fairly simple 8051-based SBC project.
« Reply #19 on: December 06, 2016, 01:34:45 pm »
I put the wrong link

the correct is

https://world.tmall.com/item/12500559730.htm?spm=a312a.7700714.0.0.D7Zo2C

Yes you can access external memory   ( http://www.silabs.com/Support%20Documents/TechnicalDocs/C8051F32x.pdf )

12.1. Accessing User XRAM
XRAM can be accessed using the external move instruction (MOVX) and the data pointer (DPTR), or using
MOVX indirect addressing mode. If the MOVX instruction is used with an 8-bit address operand (such as
@R1), then the high byte of the 16-bit address is provided by the External Memory Interface Control Register
(EMI0CN as shown in Figure 12.1). Note: the MOVX instruction is also used for writes to the Flash
memory. See Section “11. Flash Memory” on page 106 for details. The MOVX instruction accesses XRAM
by default.
For any of the addressing modes the upper 5 bits of the 16-bit external data memory address word are
"don't cares". As a result, the 2048-byte RAM is mapped modulo style over the entire 64k external data
memory address range. For example, the XRAM byte at address 0x0000 is also at address 0x0800,
0x1000, 0x1800, 0x2000, etc.
Important Note: The upper 1k of the 2k XRAM functions as USB FIFO space. See Section 12.2 for
details on accessing this memory space.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: A fairly simple 8051-based SBC project.
« Reply #20 on: December 06, 2016, 01:37:51 pm »
If this will be used for educational purposes , i would sugest take a look here

http://www.edsim51.com/
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #21 on: December 06, 2016, 03:47:19 pm »
I put the wrong link

the correct is

https://world.tmall.com/item/12500559730.htm?spm=a312a.7700714.0.0.D7Zo2C

Yes you can access external memory   ( http://www.silabs.com/Support%20Documents/TechnicalDocs/C8051F32x.pdf )

12.1. Accessing User XRAM
XRAM can be accessed using the external move instruction (MOVX) and the data pointer (DPTR), or using
MOVX indirect addressing mode. If the MOVX instruction is used with an 8-bit address operand (such as
@R1), then the high byte of the 16-bit address is provided by the External Memory Interface Control Register
(EMI0CN as shown in Figure 12.1). Note: the MOVX instruction is also used for writes to the Flash
memory. See Section “11. Flash Memory” on page 106 for details. The MOVX instruction accesses XRAM
by default.
For any of the addressing modes the upper 5 bits of the 16-bit external data memory address word are
"don't cares". As a result, the 2048-byte RAM is mapped modulo style over the entire 64k external data
memory address range. For example, the XRAM byte at address 0x0000 is also at address 0x0800,
0x1000, 0x1800, 0x2000, etc.
Important Note: The upper 1k of the 2k XRAM functions as USB FIFO space. See Section 12.2 for
details on accessing this memory space.
What I mean is 1) reading and writing code memory on the fly and 2) execute code that is just written.
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: A fairly simple 8051-based SBC project.
« Reply #22 on: December 06, 2016, 05:51:59 pm »
What I mean is 1) reading and writing code memory on the fly and 2) execute code that is just written.
You can do this if you make the external RAM respond to both program and data memory requests. /PSEN goes low to indicate reading external program memory, while /RD or /WR goes low when accessing external data memory. RAM /CE (and /OE) could be generated by combining /PSEN, /RD, and /WR with a 3 input AND gate.

On the AT89C51RC, connecting /AE to +5V maps the lower 32k of program memory to internal Flash and the upper 32k to external ROM. So you could have 32k of operating system in internal Flash, and 32k of external RAM for user programs and data. 
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #23 on: December 06, 2016, 07:38:37 pm »
What I mean is 1) reading and writing code memory on the fly and 2) execute code that is just written.
You can do this if you make the external RAM respond to both program and data memory requests. /PSEN goes low to indicate reading external program memory, while /RD or /WR goes low when accessing external data memory. RAM /CE (and /OE) could be generated by combining /PSEN, /RD, and /WR with a 3 input AND gate.

On the AT89C51RC, connecting /AE to +5V maps the lower 32k of program memory to internal Flash and the upper 32k to external ROM. So you could have 32k of operating system in internal Flash, and 32k of external RAM for user programs and data.
I have 32k SRAM (0x8000 - 0xffff) and 32k EEPROM (0x0000 - 0x7fff,) making full 64k external memory, so slightly different wiring:

/OE = /PSEN * /RD
/WE = /WR
/CS(EEPROM) = A15
/CS(RAM) = /A15

So, all those is going through one  74HC00.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #24 on: December 08, 2016, 09:13:14 am »
Now I got a breadboard prototype up, how do I implement a boot loader and a BASIC interpreter then?

Do you guys consider this a good idea, instead of implementing the interpreter in 8051 directly, implement a byte code virtual machine in the onboard ROM, and create a BASIC compiler (or LLVM backend if I want C and C++) targeting this byte code for PC.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: A fairly simple 8051-based SBC project.
« Reply #25 on: December 08, 2016, 10:33:27 am »
Quote
how do I implement a boot loader and a BASIC interpreter then?
Really?  Usually one gets the Intel BASIC52 firmware and adapts that.  It's all over the net, in various forms.  Here's one:  http://home.arcor.de/h.boehling/80c32.htm#MCS-BASIC-52
It's a real (from text) interpreter, complete with floating point, and I assume that it's REALLY slow on stock 8051, but it's essentially THE defacto standard for the 8051 world.  Or was, back when there weren't very many other choices.   http://www.nomad.ee/nomad/micros/bas52man/index.shtml

PJRC (now of "Arduino Teensy" fame) used to do 8051 stuff:  http://pjrc.com/tech/8051/

I've never gotten close enough to implementing anything that I've looked into finding an updated version for the newer chips, or into how much effort might be required to get the source code working on a non-Intel 8052-like chip.   IIRC, the big claim to fame was that once you had an 8052 with BASIC-52 in it's on-chip program memory (either by programming it yourself, or by buying an 8052BASIC chip), you could write BASIC into RAM and/or save the text in an external EPROM and run your home automation software on it (that was the killer-app.  Steven Ciarcia (more recently of Circuit Cellar Magazine) was a big proponent, and sold 8052BASIC chips via his MicroMint company.

AFAIK, hobbyist use of 8051 systems dropped off rather rapidly after PCs capable of running a cross-compiler became common, and relatively-easily programmed flash/eeprom microcontrollers (PIC, AVR, 68HC11) show up.
(It's hard to recall that PCs used to be so expensive that buying an 8051 SBC for $300 and using an old ASR33 or "dumb CRT terminal" to program it was the preferred "embedded solution"...)
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: A fairly simple 8051-based SBC project.
« Reply #26 on: December 08, 2016, 09:26:39 pm »
yes, I got a few '51 assembly example of the basic interpreter from Dr.Dobb's
and it was super fast  :-+
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #27 on: December 09, 2016, 03:43:11 am »
Quote
how do I implement a boot loader and a BASIC interpreter then?
Really?  Usually one gets the Intel BASIC52 firmware and adapts that.  It's all over the net, in various forms.  Here's one:  http://home.arcor.de/h.boehling/80c32.htm#MCS-BASIC-52
It's a real (from text) interpreter, complete with floating point, and I assume that it's REALLY slow on stock 8051, but it's essentially THE defacto standard for the 8051 world.  Or was, back when there weren't very many other choices.   http://www.nomad.ee/nomad/micros/bas52man/index.shtml

PJRC (now of "Arduino Teensy" fame) used to do 8051 stuff:  http://pjrc.com/tech/8051/

I've never gotten close enough to implementing anything that I've looked into finding an updated version for the newer chips, or into how much effort might be required to get the source code working on a non-Intel 8052-like chip.   IIRC, the big claim to fame was that once you had an 8052 with BASIC-52 in it's on-chip program memory (either by programming it yourself, or by buying an 8052BASIC chip), you could write BASIC into RAM and/or save the text in an external EPROM and run your home automation software on it (that was the killer-app.  Steven Ciarcia (more recently of Circuit Cellar Magazine) was a big proponent, and sold 8052BASIC chips via his MicroMint company.

AFAIK, hobbyist use of 8051 systems dropped off rather rapidly after PCs capable of running a cross-compiler became common, and relatively-easily programmed flash/eeprom microcontrollers (PIC, AVR, 68HC11) show up.
(It's hard to recall that PCs used to be so expensive that buying an 8051 SBC for $300 and using an old ASR33 or "dumb CRT terminal" to program it was the preferred "embedded solution"...)
That is a full featured product, but it won't work very well for me, as I need to squeeze in native code boot and EEPROM in system programming support.

I will probably use a byte code VM as it can be a full C implementation with all those features and Von Neumann bus in mind.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: A fairly simple 8051-based SBC project.
« Reply #28 on: December 09, 2016, 03:58:33 am »
BTW.  Quick and approximate cheat sheet, especially for people who might be reading this thread that are less familiar with the history:

8051:  Usually the label for the Architecture.  Aka "MCS-51"
           Also, an Intel chip with 4k internal ROM and 128 bytes RAM.

8052:  Chip with 8k internal ROM and 256 bytes RAM.

8031, 8032: like 51/52, only no internal ROM.  Could only be used in "external program memory" configurations.  pre-programmed 8052/etc would appear on the surplus markets as "8032", since the same wiring for external program memory would simply bypass any internal program memory that happened to exist.

80C52/etc:  Like 8051, only CMOS instead of NMOS - lower power!

87C52/etc:   Like 8052/etc, only with internal EPROM (UV-erasable) rather than ROM.  Usually ceramic package with quartz window for UV-erasure.  (Later, plastic with no window for One-time programming (OTP))

89C52:  like 87C52, but with FLASH internal program memory. (Atmel part number)

89C2051: low pin count (20pin) variant with 2k Flash and 128bytes RAM (Atmel.)

89S52: like 89C52, but with In-circuit Serial Programming.  Devices earlier than this required complex HV parallel programming.  (Atmel part number)


Sometime around then everyone started shipping 8051 clones (when Intel lost interest?  When they opened up the IP?  I dunno.)  Different vendors used different part number schemes to indicate different features/memorysize/memory technology.  On some, the numbers tell the story.  Others, alphabetic suffixes are more relevant...

The original architecture uses as least 12 clock cycles for each instruction.  Intel implemented a faster version (MCS-151) that did 2 clocks, and I think since then many vendors have done single-clock versions without being explicit via part numbering.  (This is "clock cycles per machine cycle", some instructions require more than one machine cycle.)  (This has some substantial impact on external program memory and such...)  (There's some microcontroller history in here somewhere.  8bit PICs are widely sneered at these days for using 4 clocks/machine cycle.  But when they were first introduced, that was pretty uncommon...)

There was a follow-on MCS-251 architecture introduced by Intel, but it didn't go very far.  (IIRC, Intel exited the microcontroller business shortly after introducing the architecture, and may have been fussier about licensing.  And by then, there were a lot more competing microcontroller architectures.)
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: A fairly simple 8051-based SBC project.
« Reply #29 on: December 09, 2016, 04:01:45 am »
Quote
[BASIC52] is a full featured product, but it won't work very well for me, as I need to squeeze in native code boot and EEPROM in system programming support.
The full basic interpreter fit in 8k.  There should be plenty of room in a modern implementation for that PLUS any additional code you need, PLUS the code to have them interoperate.
I think paul's page also had pointers to a "tiny basic" for 8051.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: A fairly simple 8051-based SBC project.
« Reply #30 on: December 09, 2016, 01:05:10 pm »
(if anyone needs the original intel 51-basic,
PM me for the binary, 8Kbyte size  :-X :-X )
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #31 on: December 09, 2016, 03:19:10 pm »
Quote
[BASIC52] is a full featured product, but it won't work very well for me, as I need to squeeze in native code boot and EEPROM in system programming support.
The full basic interpreter fit in 8k.  There should be plenty of room in a modern implementation for that PLUS any additional code you need, PLUS the code to have them interoperate.
I think paul's page also had pointers to a "tiny basic" for 8051.
Will they play nice with my Von Neumann bus unmodified? XDATA and CODE memory goes to the same place, 0x0000 - 0x7fff is non volatile while 0x8000 - 0xffff is volatile, and I also have to allow for dual booting so BASIC program does not start at EEPROM address 0x0000.

My byte code virtual machine is a Von Neumann RISC instruction set with always-aligned 16-bit instructions and botf 0x0000 and 0xffff being nop. This mean using this byte code I can easily tell if it is byte code or 8051 native code in the ROM, since the first four bytes of a 8051 program will almost never be all 0x00 or 0xff. The byte code interpreter will always refuse to boot any ROM content not starting with two nops in its own instruction set, allowing the system controller (PIC16F1455) to detect this scenario and reboot the 8051 from external bus.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: A fairly simple 8051-based SBC project.
« Reply #32 on: December 09, 2016, 03:51:30 pm »
dealing with NV-RAM(1) is not a good idea

my 68hc11 board bootstraps from the NVRAM
which is also used for the stack and data sessions
sometimes gets corrupted

also, the battery doesn't last 10 years.

I am using fe-RAM instead of NV-RAM.

(1) static ram + battery, Dalsemi/Maxim technology
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: A fairly simple 8051-based SBC project.
« Reply #33 on: December 09, 2016, 05:01:52 pm »
dealing with NV-RAM(1) is not a good idea

my 68hc11 board bootstraps from the NVRAM
which is also used for the stack and data sessions
sometimes gets corrupted

also, the battery doesn't last 10 years.

I am using fe-RAM instead of NV-RAM.

(1) static ram + battery, Dalsemi/Maxim technology
I am using EEPROM and FRAM as the nonvolatile RAM technology. (FM18W08 on SOP-28 adapter board is a drop-in replacement for AT28C256 anyway)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf