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

hex problem

dear viewers,
when i create hex files it appears to to be incomplete what is the problem please help me
i do these all things
1.project>new micro vision project>save>select device>
file>new
2.write the program
3.options the for target>set the crystal frequency>cod ROM sizes (all) no changes occurs if changes sizes>output >tick the hex
these are performed please guide me to create a complete hex file.
regards
rahul

Parents Reply Children
  • sir,
    actually my problem is hex file not contains all hex data for a larger program

    see the examlpe

    :0C0C1E000A0830313233343536373839AB
    :100BF100E4FFFEE4FDFC0DBD00010CED64504C7002
    :0C0C0100F50FBF00010EEF64284E70E7F5
    :010C0D0022C4
    :100C0E00758922758DFD759850D28ED2AFD2AC22D9
    :100B9900AD07AC06EC12099D7B487AE1798A783F6A
    :100BA9001208FBA804A905AA06AB07E4FFFE7D808D
    :0F0BB9007C431208031209D68F8CD28CD2A9224A
    :03000B00020C558F
    :030C5500B2B23206
    :080C41008F993099FDC2992240
    :03002300020AF1DD
    :100AF100C0E0C0F0C083C082C0D030985285991246
    :100B0100E512249FB408005044900B1875F003A41B
    :100B1100C58325F0C58373020B30020B34020B38F9
    :100B2100020B3C020B40020B44020B48020B4CD25D
    :100B310093801AC2938016D2948012C294800ED2EE
    :100B410095800AC2958006D2968002C296C298D03C
    :0A0B5100D0D082D083D0F0D0E03283
    :100BC800EF75F00A84AEF0EF75F00A8475F00A84C8
    :100BD800AFF074082FF8E6FF120C4174082EF8E6FF
    :090BE800FF120C417F2C020C41AC
    :080C4900C2B6120BF1D2B62273
    :0B0C2B00120BF1C2B3120BF1D2B32286
    :040C510020B4FD22AC
    :0B0C3600120BF1C2B5120BF1D2B52277
    :100B5B00E4F513F590120C0E7F32FE120B99E51390
    :100B6B00B40803E4F513E51370057F4E120C41E551
    :100B7B009054F82513F590120C49120C2B120C51B2
    :0E0B8B00120C36ADA0AF05120BC8051380D0BA
    :10080000020A42E86480F8E933E83360110460F0DA
    :10081000ED33EC337009E8FCE9FDEAFEEBFF22045E
    :1008200060DED3EB9FEA9EE99DE8C2E78CF0C2F759
    :1008300095F0400CE8CCF8E9CDF9EACEFAEBCFFB25
    :10084000120A0D85D0F05804700320D5B3E8047067
    :10085000075002B2D5020A4C92D5EC0460F7E4CC02
    :10086000C0E0C398F8603B94186008400DD0E0FBEE
    :10087000020A24E4FBFAC9FC8028E830E406E4C953
    :10088000FBE4CAFCE830E305E4C9CACBFCE8540742
    :100890006010F8C3E913F9EA13FAEB13FBEC13FC4D
    :1008A000D8F130F52FC3E49CFCEF9BFFEE9AFEEDF0
    :1008B00099FDD0E0FBEF4E4D4C701222DB03020A93
    :1008C00049EC2CFCEF33FFEE33FEED33FDED30E76A
    :1008D000EB020A24EF2BFFEE3AFEED39FDD0E0FBF0
    :1008E00050130BBB0003020A4CED13FDEE13FEEF99
    :0808F00013FFEC13FC020A24C3
    :1008F800020A4CEC5D046005E859047003020A42E0
    :10090800120A0D580460F6EC4860F2EC7004FDFE23
    :10091800FF22C860DB2481C85009C39860025006D2
    :10092800020A499850CAF582E9294B4A7005AB82F8
    :10093800020A3875F0007C1A7880C3EF9BEE9AEDB6
    :1009480099400DC3EF9BFFEE9AFEED99FDE842F04A
    :10095800DC23ACF0D0E0FFD0E0FED0E0FDAB82209D
    :10096800E7101BEB60BAEC2CFCEF33FFEE33FEED27
    :1009780033FD020A24E803F830E705C0F075F000FB
    :10098800EF2FFFEE33FEED33FD40B830E7C280AA0B
    :1009980075F020800E75F010800575F0087D007EDA
    :1009A800007F003392D530D503120A57EC3340103C
    :1009B800EF33FFEE33FEED33FDEC33FCD5F0ED22E3
    :0E09C800E5F0247EA2D513CC92E7CDCEFF221F
    :1009D600EDD2E7CD33EC3392D524814006E4FFFE19
    :1009E600FDFC22FCE4CFCECDCC24E0501174FF8078
    :1009F600EDC3CC13CCCD13CDCE13CECF13CF047015
    :070A0600F030D5DE020A57B3
    :100A0D00E9D2E7C933E833F892D5EDD2E7CD33EC2F
    :070A1D0033FC5002B2D522A8
    :100A2400EC30E7100FBF000C0EBE00080DBD000433
    :100A34000BEB6014A2D5EB13FCED92E7FD2274FFDF
    :100A4400FCFDFEFF22E480F8A2D574FF13FC7D8038
    :030A5400E480EF4C
    :03000000020A658C
    :0C0A6500787FE4F6D8FD758113020AAC1E
    :0E0A5700C3E49FFFE49EFEE49DFDE49CFC22B0
    :100A7100020B5BE493A3F8E493A34003F68001F235
    :100A810008DFF48029E493A3F85407240CC8C33386
    :100A9100C4540F4420C8834004F456800146F6DF55
    :100AA100E4800B0102040810204080900C1EE47EBB
    :100AB100019360BCA3FF543F30E509541FFEE4934A
    :100AC100A360010ECF54C025E060A840B8E493A311
    :100AD100FAE493A3F8E493A3C8C582C8CAC583CA3C
    :100AE100F0A3C8C582C8CAC583CADFE9DEE780BEF4
    :010C2A0000C9
    :00000001FF
    for aprogram this will actual hex file
    insted of that i got from keil this much

    :03000000020800F3
    :0C080000787FE4F6D8FD75810702000047
    :00000001FF
    what is problem please help me

  • hey chum. have you got the optimizer going? it can make great changes to the code and get rid of lots of crazy stuff.

  • sir,
    this will be my program in 8051 i cannot edit this due to keil hex problem i given its actual hexfile also

    #include <reg51.h>
    sbit start=P3^3; // Preparing Pin's For Microconroller
    sbit end=P3^4;
    sbit oe=P3^5;
    sbit ale=P3^6;
    sbit clock=P3^2;

    unsigned char sensor=0;

    void delay() //Simple Delay
    { int k,l; for(k=0;k<30;k++) for(l=0;l<80;l++);
    } void initSerial() //Initialize the MCU
    { TMOD=0x22; TH1=0xFD; SCON=0x50; TR1=1; EA=1; ES=1;
    } void usDelay(int a) //Initialize Clock for ADC0808 that work with 10kHz
    { TH0=256-(a/1.085); TR0=1; ET0=1;
    } void timerRoutine() interrupt 1
    { clock=~clock;
    } void sendChar(unsigned char ch) // For sending Data
    { SBUF=ch; while(!TI); TI=0;
    }

    void sendReading(unsigned char val) // Sending reading of ADC (1-Character at atime) & ','
    { sendChar(val); sendChar(',');
    } void latch() // Latch the Address of ADC
    { ale=0; delay(); ale=1;

    }
    void startConv() // Start Convertion
    { delay(); start=0; delay(); start=1;
    } void wait() //Wait the interrupt (end of convertion (EOC))
    { while(end==1);
    } void get() // to get data from ADC
    { delay(); oe=0; delay(); oe=1;
    } void main() // the main Program
    {

    unsigned char reading; P1=0; initSerial(); usDelay(50); while(1) { if(sensor==8) // sensor for 8-channel sensor=0; if(sensor==0) sendChar('N'); //Evry 8-Reading send 'N' Character P1=(P1&0xf8)+sensor; latch(); startConv(); wait(); get(); reading=P2; sendReading(reading); sensor++;

    }
    }

  • sorry about my poor knowldege in keil because i am a beginer pls help me

  • Your post of source code is illegible because you didn't follow the clearly-stated instructions for posting source code; look at the picture: www.danlhenry.com/.../keil_code.png

    If you have been similarly lax in following the instructions for using the C51 tools, then it's not surprising that you're not getting the best results!

    You need to go back and spend some time thoroughly studying the documentation:

    In your Keil installation, there is a Getting Started Guide: Keil\C51\Hlp\GS51.chp

    http://www.keil.com/support/man/docs/uv4/

    There are worked examples here: http://www.keil.com/support/man/docs/uv4/uv4_examples.htm

    There are books here: http://www.keil.com/books/8051books.asp

  • Should, of course, be: GS51.chm (a compiled Windows HTML Help file)

  • It used to be a PDF.

    You can still find the old PDF on various 3rd-party sites if you google "GS51.pdf"...