English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

can anyone pls explain this program to me?its an emergency n this is very important for my final yr engnr project.I need the explaination by thursday.so pls help..
#include
#include
#include

static void interrupt IntRoutine();
void Send();
short int Flg=0;
int Cnt = 0,Oflow=0,Mytime=0,Adval,Hbc,H...
char St1[4],St2[4],St4[3];


void main()
{

TRISB = 0x00;
PORTB = 0x00;
TRISD = 0x00;
PORTD = 0x00;
TRISE = 0x00;
TRISC = 0xbf;

ADCON0 = 0x81;
ADCON1 = 0x82;

SPBRG = 64;

TXEN = 1;
SYNC = 0;
BRGH = 1;
SPEN = 1;
CREN = 1;

DelayMs(200);
DelayMs(200);
DelayMs(200);
DelayMs(200);
DelayMs(200);

LCD_SendCmd(0x01);

LCD_SendCmd(0x80);
LCD_puts("Ebc:");

LCD_SendCmd(0x88);
LCD_puts("Tim:");

LCD_SendCmd(0xc3);
LCD_puts("Ebr: Bpm");

T1CON = 0x00; // Enable Timer1
PEIE = 1;
GIE = 1;

TMR1IF = 0;
TMR1IE = 1;
TMR1L = 0xaf;
TMR1H = 0x3c;
TMR1ON = 1;

for(;;)
{

if(Oflow)
{
Oflow = 0;
Mytime++;
}


ADCON0 = 0x81;
DelayUs(50);
ADGO = 1;
while(ADGO) continue;

Adval = (ADRESH * 256) + ADRESL;

if(Adval < 100 && Flg == 0)
{
Hbc++;
Flg = 1;
}

if(Adval > 100 && Flg == 1)
{
Flg = 0;
}

if(Mytime > 3 && Mytime < 60) RD0 = 0;

if(Mytime >= 60)
{
Mytime = 0;
Ebr = Ebc;
if(Ebc > 15)
{
RD0 = 1;
}
Ebc = 0;
}

sprintf(St1,"%3d",Ebc);
LCD_SendCmd(0x84);
LCD_puts(St1);

sprintf(St2,"%3d",Ebr);
LCD_SendCmd(0xc8);
LCD_puts(St2);

sprintf(St4,"%02d",Mytime);
LCD_SendCmd(0x8c);
LCD_puts(St4);

Send();
DelayMs(2);

}

}





static void interrupt IntRoutine()
{

if(TMR1IF)
{
TMR1IF = 0;
Cnt++;
if(Cnt >= 50)
{
Cnt = 0;
Oflow = 1;
}

TMR1ON = 0;
TMR1L = 0xaf;
TMR1H = 0x3c;
TMR1ON = 1;

}

2007-04-06 14:45:52 · 3 answers · asked by Anonymous in Science & Mathematics Engineering

3 answers

see my answer here

http://answers.yahoo.com/question/index;_ylt=AuuNfkFkD3uPu_doCnmotzTsy6IX?qid=20070406050233AA80SnE

2007-04-07 02:33:16 · answer #1 · answered by justme 7 · 0 0

Looks like you have some C for a microcontroller. Specifically a Microchip brand PIC. I can't tell if its an 8 or 16 bit chip nor if the LCD is serial based or controller based. But I suspect that it is a serial LCD.

Main is configuring the Analog to Digital Converters and the I/O Ports

You should be able to look up the data sheet on microchip for the specific chip and be able to work out the code. You will also need to know what is connected to the various pins of the microcontroller to fully understand whatthe code is doing..

2007-04-06 16:34:27 · answer #2 · answered by MarkG 7 · 0 0

The pity is, we have no know-how, or potential to think of or to visualise death. there is done lack of understanding. probable because of this, we are scared and puzzled approximately it. This dieing is unknown to all persons. there is not any know-how, no instruction manual-line, no thought. So projection of inner suggestions is lacking. this could be a “black-hollow”. enable us to think of two fold. medical: existence is, as biologically defined, a series of cells with DNA and different issues, which could perform a little paintings, derive potential from blood, depreciate and perish yet new ones are generated. religious: Spiritually defined, a soul helps the activities of a living organism. The soul escapes as in line with unknown & non-reversible phenomenon and the living organism dies. religious: As prescribed in technological awareness, enable us to circulate via some postulates. Hindus say that soul transfers. Islam says which you're in grave and on the “quayamat” day, you would be lower back in unique shape and verdict would be introduced. not straight away it potential that something like soul would be bumped off on death and decrease back to you earlier verdict is introduced.

2016-10-02 07:30:24 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers