Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 11th January 2004, 02:27 PM   (permalink)
Default 8051 "data" storage within program memory - how?

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
__________________
Remember there are 3 types of people in this world - there are those who can count, and there are those who cant ....
L0D|Mr_B is offline  
Reply With Quote
Old 11th January 2004, 02:56 PM   (permalink)
Default

ok, figured it. didnt spot the command MOVC

sorry for being dumb !!!!

B
__________________
Remember there are 3 types of people in this world - there are those who can count, and there are those who cant ....
L0D|Mr_B is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 10:31 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.