[solved]Is AT89 Microcontrollers support in Arduino?

I bought some AT89 chips thinking it's just like an attiny85 chip that I can program using Arduino :

http://www.taydaelectronics.com/ic-integrated-circuits/microcontrollers/at89c2051-24pu-89c2051-microcontroller-ic.html datasheet: http://www.taydaelectronics.com/datasheets/A-217.pdf

Somehow, after google it, it's not. Can someone help me a little bit as how I connect this chip to an uno board? I have read the datasheet, but being new to arduino and microcontrollers, I have no idea what I just read. Thanks in advance :)

==========

at89 is not support for Arduino, as it has different processor architecture.

Unfortunately for you the AT89C2051 is not an AVR processor. It's based on the Intel 8051 instruction set.

(which means that there is NO way to get these chips to work with Arduino...)

Wow, that part is still fairly popular. Digikey has over 12,000 in stock. They are even cheaper than Tayda on this part.

http://www.digikey.com/product-search/en?lang=en&site=us&KeyWords=AT89C2051-24PU&x=0&y=0

Lots of people still do 8051s. Maybe it would be a neat project to figure out how to program it. I bet it's pretty simple.

Lots of people still do 8051s. Maybe it would be a neat project to figure out how to program it. I bet it's pretty simple.

Sure; the AT89c2051 programs with a serial protocol very similar to the AVRs (IIRC, the polarity of RESET is different, but you can use the same USBASP-type programmers, if you have the right software.) But it doesn't support a bootloader, and has a processor architecture that isn't supported by gcc, so I'll stand by my statement that it can't be made to work with Arduino.

westfw:

Lots of people still do 8051s. Maybe it would be a neat project to figure out how to program it. I bet it's pretty simple.

Sure; the AT89c2051 programs with a serial protocol very similar to the AVRs (IIRC, the polarity of RESET is different, but you can use the same USBASP-type programmers, if you have the right software.) But it doesn't support a bootloader, and has a processor architecture that isn't supported by gcc, so I'll stand by my statement that it can't be made to work with Arduino.

Wasn't trying to imply that at all. Just that I bet it could be made to work easily enough. Of course I didn't look for a free compiler before so I do it now 3..2..1.. According to Wikipedia, this is free and it will program a AT89C2051. Not sure about programming yet. Bootloaders are, IMHO, overrated. Most programmers are so cheap these days, why bother?

http://en.wikipedia.org/wiki/MCU_8051_IDE

Thinking...

Still not 100% sure about programming, but this device is on my EEPROM programmer's compatibility list. So probably a lot of EEPROM programmers can do the job, just shoot the binary file produced by the IDE above up to the chip. At least that is how I have done it with PICs before.

http://www.eetools.com/index.cfm?fuseaction=product.display&product_ID=303

johnwasser: Unfortunately for you the AT89C2051 is not an AVR processor. It's based on the Intel 8051 instruction set.

I have google intel 8051. seems it's old and also popular in the old time. is it worth the time to learn this processor or just throw it away?

westfw: (which means that there is NO way to get these chips to work with Arduino...)

I kinda getting this point, it's sad but fine.

JoeN: Wow, that part is still fairly popular. Digikey has over 12,000 in stock. They are even cheaper than Tayda on this part.

http://www.digikey.com/product-search/en?lang=en&site=us&KeyWords=AT89C2051-24PU&x=0&y=0

Lots of people still do 8051s. Maybe it would be a neat project to figure out how to program it. I bet it's pretty simple.

Somehow there is little storage for this part, 2kb, but I am sure it's a neat project for those geniuses out there.

westfw:

Lots of people still do 8051s. Maybe it would be a neat project to figure out how to program it. I bet it’s pretty simple.

Sure; the AT89c2051 programs with a serial protocol very similar to the AVRs (IIRC, the polarity of RESET is different, but you can use the same USBASP-type programmers, if you have the right software.)
But it doesn’t support a bootloader, and has a processor architecture that isn’t supported by gcc, so I’ll stand by my statement that it can’t be made to work with Arduino.

This looks complicated

JoeN:

westfw:

Lots of people still do 8051s. Maybe it would be a neat project to figure out how to program it. I bet it's pretty simple.

Sure; the AT89c2051 programs with a serial protocol very similar to the AVRs (IIRC, the polarity of RESET is different, but you can use the same USBASP-type programmers, if you have the right software.) But it doesn't support a bootloader, and has a processor architecture that isn't supported by gcc, so I'll stand by my statement that it can't be made to work with Arduino.

Wasn't trying to imply that at all. Just that I bet it could be made to work easily enough. Of course I didn't look for a free compiler before so I do it now 3..2..1.. According to Wikipedia, this is free and it will program a AT89C2051. Not sure about programming yet. Bootloaders are, IMHO, overrated. Most programmers are so cheap these days, why bother?

http://en.wikipedia.org/wiki/MCU_8051_IDE

Thinking...

Still not 100% sure about programming, but this device is on my EEPROM programmer's compatibility list. So probably a lot of EEPROM programmers can do the job, just shoot the binary file produced by the IDE above up to the chip. At least that is how I have done it with PICs before.

http://www.eetools.com/index.cfm?fuseaction=product.display&product_ID=303

looks promising...

westfw: (which means that there is NO way to get these chips to work with Arduino...)

I don't know why you say that since it can be ported to an attiny with only a smidgen of RAM.

Have you ever seen an 80C390 CPU? They are 805x compatible, but run at high speeds and have extensions for large amounts of flash and SRAM. They run at 40MHz and only need 4 clocks per cycle, instead of 12. This means single cycle instructions run at the speed of an AVR clocked at 10MHz. It also contains a hardware math accelerator that does 16 AND 32 bit multiply and divide instructions, how bout that? ;)

Years ago I got to tinkering with a Dallas TINI board and using it without JAVA. JAVA was slow and buggy on it, but the hardware was awesome and really ran great. It's not the most efficient CPU design in the world, but the 805x architecture is fully capable of supporting a C compiler, so I don't see why the Arduino stuff couldn't be ported to it. I'd say that about even the lesser 805x chips.

Here is a board legend, the thing is the size of a simm stick and fits into a breakout board that gives you power, serial and ethernet connectors.

http://www.rawbw.com/~davidm/tini/legend.html http://www.rawbw.com/~davidm/tini/

Here's what they look like: http://www.rawbw.com/~davidm/tini/revd.html

Oh, an 8051 Arduino-like board would be a nice thing to have. Preferably using one of the “modern” 8051 devices (SI-labs?) with furious clock rates, single-cycle execution, and great peripherals. And the 8051 is still widely used, sold by “everyone” (Atmel and Microchip, both have 8051 devices!), and an architecture well worth being at least passing-familiar with.

But…

  1. the 89c2051 is too small to be an interesting place to start.
  2. The architecture is not "high-level language friendly. If you’ve got 8051 on your resume, you’d better know the assembly language. There are C compilers (SDCC is the big one), but…
    (Did you know that pjrc.com, of Teensy fame, started out selling 8051 boards?)

I’ve actually been working on some 8051 PCBs recently, since I’ve had some chips “forever.” The most promising architecture would seem to be an external-RAM system with a “bootloader” that copies from serial or EEPROM into RAM for execution. But that’s a significant amount of complexity compared to the single-chip Arduino. Maybe I should try a single-chip system with external programmer on board.

Bootloaders are, IMHO, overrated.

I dunno. I’d give the bootloader a lot of credit for Arduino’s success. Or at least the ability to be programmed without having an external programmer; an on-board programmer might have worked as well.

Oh yeah, I’ve known about Pauls 8051 stuff for a long time. I was kinda surprised to find him here when I joined. I thought he only really like assembler. Here is something I made several years ago on a radio shack breadboard. It runs MCS51 BASIC. 32K of external SRAM. Sure wish I’d known about the 74x573 before I built it. It has a much more sensible pin out than the typical 373 latch. It’s got what seemed like scores of point to point jumpers on the bottom that would have been much simpler with the other chip. Works fine, tested it a few weeks ago. So funny how much more powerful this is than the TRS-80 I learned BASIC on.

arduinomagbit:
looks promising…

It turns out, the tool that I linked works just fine (http://en.wikipedia.org/wiki/MCU_8051_IDE). I got a few of these chips from a cheap eBay dealer for slightly less than Digikey and got it to work no problem tonight after doing some searches on the Interwebs. The basic process is write your code, compile it in the 8051 MCU IDE that I linked above, use just about any (e)(e)PROM programmer like my ChipMax 2 (and there are many cheap ones that would work fine) to send up the resulting .HEX file, and use the chip. There is no debugger or ICE for this, you have to move the chip to the programmer and back, but it’s quite easy. Here is the project and my code. It’s simply doing an inverted Night Rider LED animation for the time being.

; Program initialization
; --------------------
	org	0h
	sjmp	start

delay:	MOV R2, #200 
outer:	MOV R3, #250
inner:	NOP 
	NOP
	DJNZ R3, inner
	DJNZ R2, outer
	RET
 
; Program start
; --------------------
start:
	MOV	P3, 0 ; enable LEDs 0-5
	CLR	P1.2 ; enable LED 6
	CLR	P1.3 ; enable LED 7
	
loop:	SETB	P3.4 ; disable LED 4
	LCALL	delay
	CLR	P3.4 ; enable LED 4

	SETB	P3.5 ; disable LED 5
	SETB	P3.3 ; disable LED 3
	LCALL	delay 
	CLR	P3.5 ; enable LED 5
	CLR	P3.3 ; enable LED 3

	SETB	P3.7 ; disable LED 6
	SETB	P3.2 ; disable LED 2
	LCALL	delay 
	CLR	P3.7 ; enable LED 5
	CLR	P3.2 ; enable LED 4

	SETB	P1.2 ; disable LED 7
	SETB	P3.1 ; disable LED 1
	LCALL	delay 
	CLR	P1.2 ; enable LED 7
	CLR	P3.1 ; enable LED 1

	SETB	P1.3 ; disable LED 8
	SETB	P3.0 ; disable LED 0
	LCALL	delay 
	CLR	P1.3 ; enable LED 8
	CLR	P3.0 ; enable LED 0

	; circle back

	SETB	P1.2 ; disable LED 7
	SETB	P3.1 ; disable LED 1
	LCALL	delay 
	CLR	P1.2 ; enable LED 7
	CLR	P3.1 ; enable LED 1

	SETB	P3.7 ; disable LED 6
	SETB	P3.2 ; disable LED 2
	LCALL	delay 
	CLR	P3.7 ; enable LED 6
	CLR	P3.2 ; enable LED 2

	SETB	P3.5 ; disable LED 5
	SETB	P3.3 ; disable LED 3
	LCALL	delay 
	CLR	P3.5 ; enable LED 5
	CLR	P3.3 ; enable LED 3

	sjmp	loop
END

The 51 series works nicely with a 32K Eprom for code, the assembler isn't that difficult.. As a matter of fact there was an assembler for the PIC (Spasm) that used the same op-codes that the 51 did. I can't remember where I got it (Parallax, I think) this was how I learned to code 51 assembler while writing assembler for a PIC16 C 57 The first op-code, sjmp was short jump as I remember and it was to jump across the reset vector to the start of code. There are bootloaders available also. There is a FANTASTIC amount of '51 assembler code around. CCS made a 51 assembler for many years, likely still do. At least the TRS80 used a good processor, Both Apple and Commodore Business Machines (Vic 20 and C 64 and C 128 used a 6502 and the 128 used a compatible chip(Ran a version of CPM..) CPM was the basis for several other languages too, ultimately Dos... IIRC...

Doc

I used the Keil C compiler once for an 805x. It was pretty nice C compiler, especially compared to the alternative(SDCC) at the time. This would have been almost 10 years ago though. I'm sure SDCC has improved substantially since then.

The TRS-80 used a Zilog Z-80 processor, similar to but not exactly compatible with an 8080. Those Z-80 processors hung on for quite some time as the core of the Rabbit microprocessor line. The Radio Shack Color Computer used a Motorola 6809. The Kim-1 was the first to use the 6502 I think.

No, I'd Argue about that... for a cup of coffee.. CBM was big on 6502's, the original Commodore Pet (similar to an Apple 2 with built in green screen monitor..) used one. I wrote a data base for a delivery service in the late 80's. For 6 Pet's (networked too) that had parts ordered as used and maintenance records on 100 vehicles. Some variant on a dbase type of database manager.. They asked me to write scheduling software but I declined... I'm Not About To TRY to write a least distance program for the Los Angeles basin with a dbase manager. The Pet was surprisingly sophisticated.. Mf'd in the early 80's it had a large amount of good quality business software. They had a couple of great word processors too. I had an IBM?... Stylewriter printer on line that could be used by any of the 'workstations' on the job at the delivery service, and a couple of line printers spread about the business..All on networked Commodore Business Machines Pet's. Funny thing but the home line of CBM stuff, Vic 20, C64 and C128 had a great synthesizer with the capability to make some very complex sound, Sprites that worked well too... Funny but after 30 years I still think about the Lode Runner program.. It was one of the great 'moldy oldies'... That and Zork.

Doc

you are a genius. I definitely will try this out. As a matter of fact, I found 2 extra at89 chips from 2 LED clock circuits that I bought long times ago.

JoeN:

arduinomagbit:
looks promising…

It turns out, the tool that I linked works just fine (http://en.wikipedia.org/wiki/MCU_8051_IDE). I got a few of these chips from a cheap eBay dealer for slightly less than Digikey and got it to work no problem tonight after doing some searches on the Interwebs. The basic process is write your code, compile it in the 8051 MCU IDE that I linked above, use just about any (e)(e)PROM programmer like my ChipMax 2 (and there are many cheap ones that would work fine) to send up the resulting .HEX file, and use the chip. There is no debugger or ICE for this, you have to move the chip to the programmer and back, but it’s quite easy. Here is the project and my code. It’s simply doing an inverted Night Rider LED animation for the time being.

; Program initialization

; --------------------
org 0h
sjmp start

delay: MOV R2, #200
outer: MOV R3, #250
inner: NOP
NOP
DJNZ R3, inner
DJNZ R2, outer
RET

; Program start
; --------------------
start:
MOV P3, 0 ; enable LEDs 0-5
CLR P1.2 ; enable LED 6
CLR P1.3 ; enable LED 7

loop: SETB P3.4 ; disable LED 4
LCALL delay
CLR P3.4 ; enable LED 4

SETB	P3.5 ; disable LED 5
SETB	P3.3 ; disable LED 3
LCALL	delay 
CLR	P3.5 ; enable LED 5
CLR	P3.3 ; enable LED 3

SETB	P3.7 ; disable LED 6
SETB	P3.2 ; disable LED 2
LCALL	delay 
CLR	P3.7 ; enable LED 5
CLR	P3.2 ; enable LED 4

SETB	P1.2 ; disable LED 7
SETB	P3.1 ; disable LED 1
LCALL	delay 
CLR	P1.2 ; enable LED 7
CLR	P3.1 ; enable LED 1

SETB	P1.3 ; disable LED 8
SETB	P3.0 ; disable LED 0
LCALL	delay 
CLR	P1.3 ; enable LED 8
CLR	P3.0 ; enable LED 0

; circle back

SETB	P1.2 ; disable LED 7
SETB	P3.1 ; disable LED 1
LCALL	delay 
CLR	P1.2 ; enable LED 7
CLR	P3.1 ; enable LED 1

SETB	P3.7 ; disable LED 6
SETB	P3.2 ; disable LED 2
LCALL	delay 
CLR	P3.7 ; enable LED 6
CLR	P3.2 ; enable LED 2

SETB	P3.5 ; disable LED 5
SETB	P3.3 ; disable LED 3
LCALL	delay 
CLR	P3.5 ; enable LED 5
CLR	P3.3 ; enable LED 3

sjmp	loop

END

Looks like the Kim-1 might have beat the PET by a smidgen. http://en.wikipedia.org/wiki/Commodore_PET

I remember the PET, but it just didn't catch on for some reason. They really pushed the keyboard entry graphics characters that were also on the Vic-20 and C-64. The C-64 was truly awesome hardware, but the "OS" or firmware or BASIC shell or whatever you want to call it really blew chunks. No commands to make even the most rudimentary use of the graphics or sound hardware. That and the total lack of documentation kept it from really taking off in my opinion. The serial hardware interface was kinda cheesy too.

I still have a Jumpman Jr cartridge somewhere. Kind like lode runner.