Hi, I am making a project using an atmel 89c51 microcontroller which has to be interfaced with an lcd screen and switches to work like a mini gaming device.I have already written the code of the game in the "C" language which is working fine. I also have a design of the basic hardware circuitry required for 8051 to run(like crystal oscillator ,power suppy ,switches). I am required to use a computer lcd screen as a display.The rest of the computer is not required only the microcontroller circuit and the computer monitor.This is where i am having trouble.What i'd like to ask is: 1. Is this feasible?.....If not would it be possible if i used an atmega16, or not at all possible even then.
2. Can anyone help me with some material required to design the circuit and the write code related to interfacing pc lcd screen with my circuit?
You mean a VGA monitor?
Why are you "required" to do this?
Why go for the least capable general-purpose processor you can find on the market (it does have very nice features as a microcontroller but hardly any stack and lousy pointer support etc) to try to produce graphical output for presentation on a display?
What is wrong with using an ARM chip with integrated display controller hardware?
The 8051 is good at looking at bits, and controlling bits. It can play with timers, serial ports, SPI, I2C, LCD text displays and a number of other things. But it is not a good processor for graphical displays.
Well , we are required to do this because these are inputs given by our project guide that have to be followed. :( ..... I meant to use a black and white lcd display but our guide doesnt agree,im afraid!!! vga monitor??? yes exactly!!!!
Well firstly i'm short on time and am not familiar with any other micro-controller besides 8051 and pic 18. ARM chips are great, but that would mean i'll have to start with learning the micro-controller all over. I am willing to do that only if i'm left with no choice i.e. if 8051 won't help achieve what i need to.
Besides what i have is not very huge or grand, its a simple game written in c language. Any suggestions???
I am willing to do that only if i'm left with no choice
You have no choice - a C51 for this task is living nightmare - not less. You must use something like a LPC2478, LPC1888 etc.
I went thru a data sheet of LPC2478.(www.nxp.com/.../LPC2478.pdf) Its got an amazing set of features,I wish I had the time to study and apply that.This is like my first ever project so i'm nervous as far as experimenting with things i've nvr heard of considering i have atmost 20 more days to finish this with the interfacing part remaining!!!
Ofcourse if it won't work i'll have to change either my muC the need to use a vga monitor display!!!!
The best way forward for you is to buy an evaluation board of "embedded artists" (or similar) that has exactly that processor installed on it. They provide sample code and schematics, too.
microcontrollers-world.com/.../
Now, I'm curious.
Are your project guide competent but evil. Or just incompetent?
Get a phone with video output and support for bluetooth serial port. Then send commands on serial port and have the ARM (most probably) processor in the phone display the video. If the project guide does give you bad advice, you might as well produce a working solution using an intelligent "adapter" on the cable.
There are several ARM development boards that are delivered with a graphical LCD on the board.
But the big oops here is 20 days remaining for either solving a problem a 8051 is totally lousy at solving or switching to totally new hardware and start from scratch.
For a bit of fun - send your project guide to this forum, and we'll see how well he/she can defend his idea.
There is a huge difference between emitting text on a text-only LCD and to produce video output (not just a single image but something that is regularly updated - maybe even in real time with is common to games) on a graphical display. Not to mention interfacing with raw video data which means that the image will not just have to be generated in the memory, but must also constantly be refreshed. A VGA-type video signal normally doesn't support refresh rates lower than 50 full frames per second. If going down to 320x200 CGI resolution but monochrome at 50Hz, there is still 3.2 million bits to send out every second - besides the CPU time that is needed to regularly change the image memory to get new data to display.
There have been examples where people have abused SPI hardware to get microcontrollers to emit video data. But with huge amounts of work put into the task. Real designs uses video controllers that emits the video data in the background, so the processor can spend all the time on figuring out what contents to place in the video memory.
Most graphical LCD don't take video data, but have an internal image memory. So just about any processor can send data to it - the problem is only if the data can be produced and copied to the image memory fast enough to get the required number of frame changes / second, i.e. to get the display animated.
So - are you volunteering to implement a video game with just software-driven video? You have 20 days. Report back the result.
I have seen a number of PIC and AVR chips do video output. Some AVR examples: www.atmel.com/.../mega163_3_04.pdf www.serasidis.gr/.../avr_vga.htm
But note that a 8051 is actually worse off than a PIC or AVR because the instruction set is not really general-purpose. It is still possible to do, but it does take a bit of effort.
Don't be silly - to my understanding, this is not even close to what the OP is referring to.
not volunteering. but is doable.
Don't think anyone have said impossible. Just that the 8051 is at the bottom of the list.
Here: www.8052.com/.../
But you're happily skipping the input that you are supposed to be doing the work - yourself...?!