1

Topic: Is it possible to do .A51 project

Everything seems to be set up for the C programmer.  I want to do very smoll projects to run on smaller/cheaper 8051s, entirely in assembler. Am trying to use the DK3300 ELCD development board so I can have JTAG debugging facilities, but RIDE is much more complex than I am used to and I am unclear about what it is doing automatically in the way of startup / header  / include files.
I need an example of a LED blinker or something simple that is entirely in assembler.

2

Re: Is it possible to do .A51 project

I do not know how you missed it completely, but when you download and install the RIDE package, there is a bunch of directories that are created by it.

Go to the installation directory of RIDE and you will find a nice collection of examples, just what you asked for.

As you are there, check out the manuals in PDF format as well.

Ed

3

Re: Is it possible to do .A51 project

Could you name one ?
When I look at the .A51 routines, I see a lot of them, but half are startup.a51 for different chips, and most of the rest seem to be functions called from C or having to do with banking or monitors.

I want an example of a useful project that is, one .A51 module, comprehensible to a non-professional, and of a managable size.  A LED flasher, LCD writer, or something that responds to push-buttons etc.  A routine that optimizes code or does non-euclidian geometry will be over my head.

4

Re: Is it possible to do .A51 project

Harvey

I think you and me must be in the same club! I've had the dev kit for a couple of weeks now and still can't work out how to use it. My old assembler allowed me to write code, then simply hit a key and download it to my eprom programmer. I can't find any asm samples that I expected to be there and like you I'm getting pretty fed up trawling through endless pages of info that tell me everything except how to use it!

Must be getting to old for the technology!

Bill

5

Re: Is it possible to do .A51 project

<i>My old assembler allowed me to write code, then simply hit a key and download it to my eprom programmer</i>

some "old assemblers" like e.g. the very poipular Metalink worked that way.  However to work that way you run into a brick wall if you try to have your source in more than one file.

so, you have two choices" wear out your scroll button and "then simply hit a key and download it to my eprom programmer" OR use a modern tool that use a <b>linker</b> to combine several objects.

Erik

6

Re: Is it possible to do .A51 project

or is it that it is above your dignity to follow simple instrructions?

http://www.raisonance.com/files/pdf/GetStart51.pdf

7

Re: Is it possible to do .A51 project

Erik

Thanks for the reply. Perhaps I didn't make the point very well.

My current (old setup) is SDE and this allows me to have several modules, which at a single key press get assembled, linked and downloaded to a Dataman S4 programmer/emulator. I know the code is old but it's served me well over the years but I do need to move on to a more uptodate device for my 8032 based product with it's external EPROM and ram chips.

I purchased the DK3400 kit thinking that this would allow me to work in standard 51 assembler that I'm quite comfortable with but in a more modern Windows environment. I don't really need debuggers and all the bells and whistles it comes with, just the ability to ideally take my existing code and get it running on the new uPSD3434 device.

To date I've managed to run the demos successfully but all attempts to write simple code in assembler and get it to run have failed. The program tells me it's running and even shows me the break points but trust me, what I see on the PC screen isn't what the processor is doing, my trusty old scope tells me otherwise. I've even had to resort to getting my son involved but even he after three days solid could only suggest I start writing in C as that seems to be the only way to make anything work.

I don't know, I think I must be missing some simple point somewhere and I can’t help but think it's a bit like getting a new car with all the technical manuals but can't work out where the ignition key goes

I'm going to give it another go this weekend. I'll let you know how I get on.

Bill

8

Re: Is it possible to do .A51 project

Follow on....

I've just spent the last hour trawing through the startup pdf (again) and have to agree 100% with Harvey in that unless you understand C, it may as well be written in Chineese.

Considder this silly little bit of code

            LJMP,START

START:

9

Re: Is it possible to do .A51 project

Whoops!

            Segment code

LJMP,START

START:        CLR,EA        ;Global interrupts off
MOV,R7,#0    ;R7 is a counter
        DJNZ,R7,$    ;delay loop 256  times
        CPL,P1.3    ;toggle a pin on port1
        SJMP,START    ; indefinite loop

Ok, this might not be 100% right but I can type something like this on my current system download it and check with my scope that the port pin is doing what I tell it to do.

So my question is, without knowledge of C and without debuggers, emulator and monitors, how the heck do I get this simple bit of code running on the target processor? Any help would be greatly appreciated as I’m getting increasingly frustrated.

Bill

10

Re: Is it possible to do .A51 project

Well I've spent another two days trying every which way to get something to work but all to no avail. The most frustrating thing about this whole sorry affair is that unlike others, I don't need any help with the coding and I understand pretty much everything about the processor but I still can't work out how to use it! Soooooooooooo Frustrating!!!!!!!!!!!!!

Why oh why have ST not provided some simple code examples with a bit that says write your assembly code here! At least it would be a starting point.

Bill sad

11

Re: Is it possible to do .A51 project

Hi,

The uPSD is much more than a big 8051 and needs some configuration before playing with the IOs like you are trying to do. I think that this is what you miss in your tests, nothing to do with C/assembler.

Anyways, here is an example project for uPSD33xx in assembler which I will include it in the next version of RIDE:
ftp://www.raisonance.com/pub/LEDS_ASM.zip

It just increments a counter and writes the value of the counter on port A. (this is fine for the REva board. Maybe you'll have to modify it a little for the DK3300)

It includes the uPSD33xx startup, which is in two files, one assembler and one C file. You don't need to understand what the C file does, just include it in your project like in the example.

Then, there is the main.a51 file that you can modify for your own application.

And that's it.



Now, for using RIDE as a simple downloader, you simply need to uncheck the "debug" checkbox in the advanced debugging options.

This way, when you press "Ctrl-D", (that's two keys but still quite a short manipulation wink ) RIDE will just build the project and download it to the chip, but not start the debug. Then you just need to press the reset button on the board and the program starts.


I hope it helps.

Best Regards,

Vincent

12

Re: Is it possible to do .A51 project

Vincent

Thanks for the information.

The good news is that on Saturday, I did eventually manage to work everything out, generate a hex file and download it via the Caps package. As far as I can see the Upsd3434 defaults to standard 8031 format i.e. if you don't enable any additional functions it seems to work just the same which is good because it allows existing code to be used.

For anyone like myself who has only used a simple assembler package, migrating to this will, as I found, be a nightmare. Getting rid of the debugger and the code that used it seems to be the key and it's just a pity that this isn't more obvious. I've seriously wasted over two man weeks just trying to get something to work and was on the verge of looking for other alternatives. A simple pure assembly code example and some simple instructions could have averted a lot of frustration for us low-level guys.

Anyway I'm now in the process of trying to make my source files look tidy and readable on the new editor, a bit of a chore with about 40k of source code but I've come across this sort of thing before.

No doubt I'll be back with some more questions but in the meanwhile, thanks again for the info.

Regards Bill

13

Re: Is it possible to do .A51 project

Hi,

What exactly do you mean by "Getting rid of the debugger and the code that used it..." ?

As far as I know, there is no code using the debugger. Is it something in the PLD?

If you can send me your test project by email, then maybe I can include it in RIDE to avoid other people in the same situation loosing time.

Warm Regards,

Vincent

14

Re: Is it possible to do .A51 project

Vincent

I'd be pleased to pass on all my experiences to you in the hope it may help others but that said, I'm still struggling though trying to get to the point where I was with my old assembly package so bear with me on this.

I'm sure that much of my problems are due to the fact that it's just a different package and just like when you change to a new VCR, it never seems to be as easy to use and the old one! Clearly everything works but for me the basics are hard to find in the mass of detailed information provided.

I think that most people that purchase a development system would like to see some simple results quickly then as they become more comfortable and confident with the package, move on to some of the more involved aspects. A simple assembly tutorial seems to be the thing that’s missing and I will attempt to do something for you on this if it helps.

My task just now is to convert my current product that uses both 8032 and ST6 into a single processor unit with scope for future enhancements. Basic details of the unit can be found on the company Website www.datamasteruk.com

Regards

Bill Green

15

Re: Is it possible to do .A51 project

OK.

But I still don't understand what you mean by "... the debugger and the code that used it ..." ?

Vincent

16

Re: Is it possible to do .A51 project

Vincent

The situation was that having assembled and downloaded an extremely simple program, running the debugger showed the program to be running and responding to breakpoints but despite this, the processor pins showed it just wasn't doing what the PC screen it said it was.

Inserting a few no ops just after the initial start-up interrupt jump confirmed that the code was actually running through the no ops indicating either timer 0 was generating them or the watchdog was running. Given the first instruction was to disabled all the interrupts this shouldn't have happened. And yes we did do a reset but to no avail. It was just like it was running some other program although it showed my code being stepped through??????????

Don't worry about this because it's probably down to my lack of understanding of how the package works. But for now I'm getting there albeit slowly.

Regards

Bill Green

17

Re: Is it possible to do .A51 project

Right here’s the final verdict!

Having spent a huge amount of time trying to get my existing code to run on this package, I've finally managed to get it to assemble and link successfully BUT>>>>>>>>>>> now I get told I've exceeded the limits of the evaluation version and yet again I'm at another dead stop!

Ok I knew that this might well be the case but now the question is; Do I now pay good money for the full version of this software that up to now has shown itself to be woefully inadequate and lacking for anyone coming from a pure assembly background or do I just call it a day and look for another package?

Answer, I'm quitting and suggesting that Raisonance should seriously rethink it's claim that this product is in any way suitable for anyone but those having an full and in-depth understanding of the C language and are prepared to trawl through endless reams of detailed information to find the most basic information.

Two experience programmers both beaten by a software package! This just SHOULDN'T HAPPEN! especially with something you expect people to pay money for!

Disappointed?   YOU BET!

Bill Green
M.D. Datamaster Ltd

18

Re: Is it possible to do .A51 project

Hi,

Well, thank you for your feedback. We always appreciate a constructive criticism of our work, positive or negative, because this is what allows us to improve it. However, if your participation in this forum tells us that something was not good for you in what we made, we still can't understand what.

We would be more than happy to modify our documentation, examples or anything that might avoid this situation happening anymore, according to your remarks and suggestions. But for this we would need some more precise information on your problems.

Was it the documentation that was not clear? What in particular was hard to find? Was it the uPSD-specific part, the project management, the assembler directives, something else ... that was not clear? I sent you an example project in which you just had to add your source files and then it should have been setteled; Did you try it? Did it help? What happened?

Best Regards,

Vincent

19

Re: Is it possible to do .A51 project

<i>Ok I knew that this might well be the case but now the question is; Do I now pay good money for the full version of this software that up to now has shown itself to be woefully inadequate and lacking for anyone coming from a pure assembly background or do I just call it a day and look for another package? </i>

Visulaize this: you have driven for years and some day your car breaks down and is out of commission for a month.  You borrow Bill's car and OOPS it is a stick shift.  I guarantee you that there will be "kangoroo drops in the gasoline" for a while.  Then suddenly you get it and you start actually enjoying the many ways you can manipulate the behaviour of the car by shifting up or down.

Now what was your original statement? it was "oh what a drag it is to drive a shift"

so, if you want to keep driving in automatic (using whatever package you currently use) that is your choce, but the benefits of the 'linked approach' will forever be lost to you.

Erik

PS I am not paid by any compiler/assembler or linker manufacturer.

20

Re: Is it possible to do .A51 project

Flat Garden Hose Watering- [URL]http://yoet.my-top.net/flat-garden-hose-watering.html [/URL]; <a href="http://slimpeachy.sitesled.com/joks-daddario.html">De Lectura Proceso</a> Current Mortgage Nj Rate - http://rslist.org/current-mortgage-nj-rate.html ; Kino Tachira - http://realandnatural.my-top.net/kino-tachira.html ; Office Of Banks And Real Estate Illinois - http://wrangels.climaxmature.com/office … inois.html ; [URL=http://forum.rslist.info/ ]Address Dns Server[/URL] <a href="http://julilatinina.analloverz.com/life-insurance-how-much-is-needed-canada.html">Life Insurance How Much Is Needed Canada</a> <a href=""></a> 5ab82fd943d6de24 b709bd5d7a7c8712 6de5818b18