Studio 6 and AT90S1200

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys, simple question probably:
I have a lot of old industrial boards with AT90S1200s on them. Is there any way I can program those with Studio 6, or do I have to get an older version of Studio?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Shirley, you can use an assembler with any chip. You only need the device INC file for your SFR details.

When it comes to re-flashing boards with the resultant HEX file, there are many third-party programs that will drive your programmer. e.g. avrdude.exe or stk500.exe

I would guess that you don't really want to Simulate or any other complex tasks.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It depends what you mean by "program".

If you mean write Asm source code and get it assembled into .hex then, yes it appears that AS6 still includes the 1200def.inc file which suggests it still has support for that.

If you mean take a hex files and burn it into the flash of an AVR using an Atmel programming tool driven by AS6 I fear you may not be so lucky.

So you might have to do the actual device programming of the generated .hex file external from AS6 - perhaps using avrdude?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry, I was being unclear.
I meant, can I use Studio 6 to write C code for my board, debug, simulate and then burn it into my chip, using a AVRISP Mk II?
Connecting to the AVRISP seems to work, but I can't find the AT90S1200 in the device list when I make a new project, so I guess the actual writing and debugging of the code isn't possible?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Edit. Cliff has pointed out that C is not possible for a AT90S1200

You can probably manage the bigger obsolete chips by:

Do you seriously want to Simulate?
If so, forget about AS6. Install AS4.

You can probably compile C for obsolete AT90Sxxxx in AS6 by massaging the Makefile. e.g.
1. create AS6 project for Tiny2313.
2. Build once.
3. Select External Makefile.
4. Browse for the AS6 on-the-fly Makefile.
5. Select it.
6. Edit for AT90S2313.

You can burn the HEX by putting your external avrdude command in the "Post Build" command.
Or put it in your 'proper' external Makefile.

Surely, any realistic job is a simple tweak to some legacy firmware. You are hardly going to start a project from scratch.

David.

Last Edited: Wed. Oct 17, 2012 - 09:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I use Studio 6 to write C code for my board

No you can't. Surely the 1200 predates AVR with RAM and cannot support C?

I just checked the 1200 datasheet and confirm that it has no RAM apart from the 32 general purpose registers and a 3 deep (9bit wide) hardware stack.

So there's no way you can program it in anything but assembler.

Rather curiously, on loading an Atmel assembler project in AS6 the device selector does not seem to mention at90s1200 even though I know the 1200def.inc file is part of the package? This comes back to a thread yesterday where it was noted that the device selection in an Asm project leads to -i
def.inc being given on the command line to the assembler. If the IDE won't let you select 1200 it won't be able to pass this and if you then try to use:

.include "1200def.inc"

at the top of such an asm project it will clash with whatever device has been selected.

Bottom line use Atmel Assembler in AS4 or invoke the AS6 assembler away from the IDE at the command line.

BTW the 1200 had no debug interface and there's no simulator for it so there will be no "debugging" via the IDE. YOu'll just have to flash LEDs on a pin or something. But given that you are only going to be writing 512 opcodes in Asm it's not going to be a very complex program anyway.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I didn't research that deeply into the data sheet. Thank you for helping me out.
Seems I'll install AS4 and try my hand at ASM for the first time since school :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The question I ask myself is "is it really worth it?". I suppose you could call it an interesting learning experience but there are many many better AVRs to learn Asm on than the AT90S1200. The fact that your "RAM" is really just using some of the upper 32 registers and that there is no real stack will make you program through hoops! A lot of example Asm code for AVR you see on the internet is not going to be usable in that chip because of it's limitations.

OTOH I suppose it is a nostalgic trip back in time to see how the early AVR pioneers had to battle!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The reason why I choose this exact chip is that the place where I work used to use them in some very handy, small boards with SPI, IR, a LED and a port routed out and they just threw out a big bunch, which I promptly secured for future use in small time projects.
Maybe you're right that it doesn't pay... I'll see soon enough :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bin the AT90S1200s
Use tiny2313/4313 with the pcb.

Of course the pcb layout may not be suitable for the Tiny2313 peripherals. After all, the 1200 did not have many !

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually, the replacement version is the exact same board, only with the 2313.
They also throw those away frequently, and often they have none or very little damage to them.
The cost of those boards compared to the cost of man hours ensure that it's easier and cheaper for the company to discard them. However, for the hobbyist, they're nice to have.
Good idea to simply remove the ATs and solder in 2313s instead, I hadn't thought of that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
BTW the 1200 had no debug interface and there's no simulator for it so there will be no "debugging" via the IDE
Unless the company can also "throw out" an ICE200. :-)
Using the AT90S2313 Adapter for Emulating the AT90S1200 
The AT90S1200 can be defined as a subset of AT90S2313. They have the same pinout, but AT90S1200 does not have the following features : 

UART 
SRAM 
Memory Access Instructions (ld/st/lds/sts/ldd/std/lpm) 
16-bit Arithmetic Instructions (adiw/sbiw) 
INT1 
Timer / Counter 1 and Input Capture 
Stack Pointer to SRAM (AT90S1200 has a 3 level hardware stack) 
Avoiding the use of these features and using only half the program and EEPROM memories allows the AT90S2313 to be used when emulating AT90S1200. 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly