This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is this somehow possible?

Hello :)

I am new to 8051 family programming and I have a question. I would like to know if there is anyway, somehow, to put another software in a memory and load it from 8051 to run on it. It would work similar to plugins :)

Speaking in C language, it would be like a function inside the memory that do something. That function receives a pointer to a structure that has many other functions that the main software inside the microcontroller has, like display things on a screen. Well, is very similar to plugins :)

Is this possible? With other microcontroller maybe?

If I said something wrong or confuse please, let me know!
Thank you!

Parents
  • Just a quick note here. If you are going to do something with a graphics display, the amount of work will quickly explode. And the amount of load on the processor will also increase. Please look at an ARM chip. It is a way more general processor, reducing the amount of time you will have to fight with the processor.

    But an even more important thing. Don't start too ambitios. Start with something simple. Get it to work. Then spend time thinking about how to extend it. Better to end up with a solution that only plays one game - such as tetris or some board game - than to have spent a lot of hours and end up with an unfinished product. The important thing is to do something that regularly gives you positive feedback. Progress is very important.

    If you decide to continue, after having a working platform, quite a lot of simpler games can be implemented as byte-coded applets.

    The general concept of a library is quite advanced. A real library requires linking. Either dynamic or static. But that linking step requires you to know how to update references inside the code, to make a call or variable reference from one module end up reaching the correct function or variable in another module. It is a very complex concept, unless you not only are very good with C (and possibly assembler) and are good at extracting information from the compiler output files. The C51 compiler is totally unsuitable for this, because of how the C51 compiler interacts with the linker.

    And switching to a solution with function pointers requires a processor that is comfortable with pointers which means that you want a general-purpose processor with good I/O abilities. The 8051 chip is not general-purpose. It is very good at bit-access I/O, but falls short when it comes to general pointer and memory manipulation.

    Whatever route you decide to do - implement a single game, try a byte-coded virtual machine or implementing a BIOS-style solution with function pointer arrays or similar - do not (!) select a 8051 chip. Just about any other chip would be better. I like ARM chips, but there are several other architectures that will all be way better than a 8051 chip for this kind of project.

    So select a GP processor, start small and then see where you end up.

Reply
  • Just a quick note here. If you are going to do something with a graphics display, the amount of work will quickly explode. And the amount of load on the processor will also increase. Please look at an ARM chip. It is a way more general processor, reducing the amount of time you will have to fight with the processor.

    But an even more important thing. Don't start too ambitios. Start with something simple. Get it to work. Then spend time thinking about how to extend it. Better to end up with a solution that only plays one game - such as tetris or some board game - than to have spent a lot of hours and end up with an unfinished product. The important thing is to do something that regularly gives you positive feedback. Progress is very important.

    If you decide to continue, after having a working platform, quite a lot of simpler games can be implemented as byte-coded applets.

    The general concept of a library is quite advanced. A real library requires linking. Either dynamic or static. But that linking step requires you to know how to update references inside the code, to make a call or variable reference from one module end up reaching the correct function or variable in another module. It is a very complex concept, unless you not only are very good with C (and possibly assembler) and are good at extracting information from the compiler output files. The C51 compiler is totally unsuitable for this, because of how the C51 compiler interacts with the linker.

    And switching to a solution with function pointers requires a processor that is comfortable with pointers which means that you want a general-purpose processor with good I/O abilities. The 8051 chip is not general-purpose. It is very good at bit-access I/O, but falls short when it comes to general pointer and memory manipulation.

    Whatever route you decide to do - implement a single game, try a byte-coded virtual machine or implementing a BIOS-style solution with function pointer arrays or similar - do not (!) select a 8051 chip. Just about any other chip would be better. I like ARM chips, but there are several other architectures that will all be way better than a 8051 chip for this kind of project.

    So select a GP processor, start small and then see where you end up.

Children