Go Down

Topic: 8051 microcontroller (Read 248 times) previous topic - next topic

shreevatsa

Can i program 8051 microcontroller using Arduino UNO. If possibe, please let me know how.

Thanking you
Shreevatsa Y S
E-mail: shreevatsa@hotmail.com

rogerClark

See

http://forum.arduino.cc/index.php?topic=154096.0

Basically. No.

Probably not impossible to do, but no one has done it so far.

Also the bootloader may not be possible
Freelance developer and IT consultant
www.rogerclark.net

Paul__B

You most likely can; in the same way you use the "Arduino as ISP" function to program another Arduino system, you could produce a sketch to generate the programming patterns for an 8051 processor.  I fancy many 8051 systems require parallel programming and the Arduino has a fair number of pins available for this; parallel programming algorithms usually require a higher voltage which you would need some additional circuitry to control but other than that, it is entirely possible.

Of course, you have to know the programming algorithm for whatever you mean by an "8051" and if you are asking for ready-made sketches to perform the task, that will take a lot more research.  Feel free to make that your own project.  :smiley-lol:

pito

#3
Mar 29, 2015, 11:09 pm Last Edit: Mar 29, 2015, 11:16 pm by pito
Ie. dallas (now maxim) 89c450 (33MHz one clock per machine cycle) has got a built in bootloader (via the uart). Works fine.
PS: above chip is half of the atmega328p performance clock to clock. Why do you need 8051 then?

rogerClark

Edit

I just re-read the original post

Quote
Can i program 8051 microcontroller using Arduino UNO.
Perhaps the OP wants to use the UNO to act as the in-circuit programmer.


Sorry, I jumped the gun and assumed they want to program using the Arduino IDE onto the 8051


Actually, I have been looking at how feasible it generally is to develop for the 8051 core, as its used by the TI CC2540 and CC2541 Bluetooth Low Energy system on a chip devices.

However there doesnt seem to be mainstream GCC for 8051, there is the SDCC "Small Device C Compilor"
http://sdcc.sourceforge.net/

But I don't think its actually GCC.


Judging by the number of new uP's having hardware files created for them, for the Arduino IDE, I'm sure it would be possible to build some sort of basic "wiring" style functionality for 8051 but as has been alluded to, it would depend on what flavour of 8051 is being used.
Freelance developer and IT consultant
www.rogerclark.net

pito

#5
Mar 29, 2015, 11:23 pm Last Edit: Mar 29, 2015, 11:26 pm by pito
Quote
Actually, I have been looking at how feasible it generally is to develop for the 8051 core, as its used by the TI CC2540 and CC2541 Bluetooth Low Energy system on a chip devices.
Consider Keil C51, or IAR C51, both support banked memory for code and data..

rogerClark

Consider Keil C51, or IAR C51, both support banked memory for code and data..
LOL

umm. Not sure most people have the budget for IAR ?  $2500 ?? (Yes i know there is a cut down version that will compile a few kb, but I doubt if thats much use to anyone), nor is the time limited version.

and Keil is $$$ as well, isnt it ??
Freelance developer and IT consultant
www.rogerclark.net

westfw

#7
Mar 30, 2015, 04:31 am Last Edit: Mar 30, 2015, 04:33 am by westfw
SDCC is supposed to be a usable C compiler for 8051.  No "free" C++, AFAIK.  Porting the Arduino core in a meaningful way would be "challenging."

Keep in mind that the 8051 architectures is NOT C-friendly.   If you've ever looked at marketing claims from the likes of Atmel or Microchip about how AVR or PIC24 is "C friendly", and then looked at the datasheets and thought "that doesn't really look that C friendly" - well, what they really meant is "friendlier than the industry standard 8051 architecture!" :-(

There are some very nice 8051 variants available these days, not to mention their presence inside of various "system" chips like the wireless devices you mentioned.

Traditional 8051 chips were programmed via a "high voltage parallel programming" method: very unfriendly to arduino-class boards.   However, the more modern chips have flash and DO support in-system Serial programming, and many also support bootloaders.  Some sort of  8051-uino would clearly be possible.  (Also, the Atmel 8051s use an ISP protocol VERY SIMILAR to the AVRs (RESET polarity is reversed.)  So programming one of these using ArduinoISP would only require some relatively minor modifications.)

However, there's nothing quite as hobbyist friendly as the 28-pin AVR dips.  There's the AT89C4051 in a 20pin DIP.  But it only has 4k of flash and 128 bytes of RAM.  The "modern" chips I mention are usually in fine pitch SMT packages.
Still, it's a little surprising that none of the vendors has put one of their chips on an "Arduino compatible" eval board, just for access to all those shields.

rogerClark

Still, it's a little surprising that none of the vendors has put one of their chips on an "Arduino compatible" eval board, just for access to all those shields.
Not sure if you mean the 8051 vendors or just the other vendors in general

STM have the Nucleo series of boards which have Arduino style headers and they have tried to make them as pin compatible as possible, but of course they are 3.3V devices, so a lot of shields won't work, and they also didnt both to create the Arduino "hardware" files (as you know ;-)
Freelance developer and IT consultant
www.rogerclark.net

pito

#9
Mar 31, 2015, 11:59 am Last Edit: Mar 31, 2015, 12:15 pm by pito
Ie. dallas (now maxim) 89c450 (33MHz one clock per machine cycle) has got a built in bootloader (via the uart). Works fine.
PS: above chip is half of the atmega328p performance clock to clock. Why do you need 8051 then?
I messed with the DIL 40pin 89C450. Programming via built in bootloader (serial 115k2 uart). So _very_ breadboard friendly. Wrote some C code (fp trig math test) to benchmark (Keil).
                              MHz    Elapsed us            mA
1284p Arduino         16              845               -
89C450 Keil C51      32             1317            81 (5V)

So you may see the 51's architecture is really not much C friendly. The C450 is 3.1x slower clock to clock when doing fp math.
The only positive stuff I saw was the Keil and IAR support banking of memory (flash and sram) with C, so you can write ie. xMBytes large C code which requires yMBytes of ram and it will work (provided you wired the external flash and sram to the 8051). Interesting.. :)


Go Up