??? 01/21/06 13:37 Read: times |
#107977 - Steps Responding to: ???'s previous message |
Andy wrote:-
"Read the uVision Getting Started Guide - it's included with the download. It includes example projects - you should work through these. this will give you a proper introduction to the tools and how to use them - rather than just blindly jumping in at the deep end! " Dear Andy, Thank you for the impetus. Just now I successfully compiled the following lcd8helo.c with µVision2.Only problem I faced was that I had to open the .lst file generated,go to the end of it to see. "C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)". I wonder why can't I see it in the IDE. Dear Andy will you now help me in alarm.c?This was a chance to learn C51 while working.I just did a double alarm software clock without RTC.I can always go back to my established assembly codes for 4bit lcd and appl note 95 for writing in DS1307 ram?.In fact a system loaded with ds1307,at24c16,max232 and AT89X52 is lying ready on my table.You can appreciate that only for multiple time checking I thought of using C,(just to avoid typing multiple cjnes),be that SDCC or µVision2. Regards Rudra /****************************/ /* lcd8helo.c */ /****************************/ #include <stdio.h> #include <string.h> #include <reg51.h> sbit RS = P1^2; sbit RW = P3^6; sbit EN = P1^3; void ready(void); void command(int); void display(char*); void main(void) { command(0x3c); command(0x0c); command(0x06); command(0x01); command(0x80); display("LCD8 How are you"); while(1); } void command(int a) { void ready(void); ready(); P2=a; RS = 0 ; RW = 0 ; EN = 1 ; EN = 0 ; } void display(char *str) { unsigned int i; for(i=0;i<=strlen(str)-1;++i) { if (i==8) command(0xc0); if(i==16) command(0x80); ready(); P1=str[i]; RS = 0; RW = 0; EN = 1; EN = 0; } } void ready(void) { EN = 0; P2 = 0xff; RS = 0; RW = 1; while(P2^7) { EN = 0; EN = 0; } EN = 0; } |
Topic | Author | Date |
Multiple files in Keil µVision2 | 01/01/70 00:00 | |
Step-by-Step | 01/01/70 00:00 | |
Steps | 01/01/70 00:00 | |
Output Window | 01/01/70 00:00 | |
original question | 01/01/70 00:00 | |
It's really very simple | 01/01/70 00:00 | |
Can compile but how to fit 2051? | 01/01/70 00:00 | |
You can't! | 01/01/70 00:00 | |
But it's working on my table | 01/01/70 00:00 | |
Read it yourself! | 01/01/70 00:00 | |
Switch to Raisonance | 01/01/70 00:00 | |
or stop freeloading![]() | 01/01/70 00:00 | |
help me | 01/01/70 00:00 | |
something about keilc programming | 01/01/70 00:00 | |
keil evaluation version | 01/01/70 00:00 |