• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8051 "data" storage within program memory - how?

Status
Not open for further replies.

L0D|Mr_B

New Member
hi all.

i'm redesigning my project for an "advanced" fan controller, using the 8051, and ive run into a brick wall :shock:

what i want to do is store commands in memory for a VFD (hard stored - not changeable, these are the commands to be passed to the VFD by my routines, it's for grfx, etc). what i want to do is something like :-

e.g.

LABEL data "this text is to be printed on the VFD"

e.g

DRAWBOX data 04,88,7F,90,94,00

.... where all the data is hex codes - a string - these would be predetermined commands for the VFD. question is, how do i access this data string, when i think the 8051 can only access DATA memory for data manipulation, not access program memory, where obviously this code sting for the VFD would reside.

i was going to add the strings in memory, then access them with a routine which would move along the string till it hit's a 00, where by the subroutine returns. my project was going to be PIC based, till i hit this, so going to 8051, plus i need more memory space (now can have 64K)

i know i could write something like :-

send "04"
send "88"
send "7f"
send .......

... but this would be both very wastefull and time consuming to code. i guess it comes down to "how do i load a register with a byte from program memory"

any ideas? can u think of another microcontroller which can be programmed via external eprom which has this facility, if it cant be done on the 8051?

B
 

L0D|Mr_B

New Member
ok, figured it. didnt spot the command MOVC

sorry for being dumb !!!!

B
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top