Total Pageviews

Sunday, August 28, 2011

How to create a component in Proteus...

3 comments:

  1. This video can be viewed by owner only. Why???

    ReplyDelete
  2. Need some help over here....Im new to avr and im doing a smart grid project..but the simulation ckt not working with the hex file generated using the below code..anyone help me on this ?
    #include
    #include
    #define F_CLK 16000000UL
    unsigned char c_lane=0,c_home=0,i,loads,mode,k=0,count=0;
    int main(void)
    {
    int p=0;
    while(1)
    {
    while(k<10)
    {
    i=PINC;
    loads=PIND;
    if((loads & 0x10)==0x00)
    { goto theft_sent;
    }
    mode=i&0xc0;
    switch(mode)
    {
    case 0x00:
    {
    PORTA=(1<=c_home))
    {
    if((PORTB & 0x10)==0x10)
    goto theft_received;
    k=0;
    }
    else
    {
    if((loads & 0x10)==0x00)
    {
    PORTB|=(1<<PORTB4);
    goto theft_sent;
    }
    while(p<10)
    {
    _delay_ms(2000);
    p++;
    }
    k=0;p=0;
    }
    theft_sent:
    if((PIND & 0x01)==0x00)
    {
    PORTB|=(1<<PORTB4);
    while(count<5)
    {
    _delay_ms(2000);
    count++;
    }
    count=0;
    PORTB=0x00;
    }
    theft_received:
    if((PINB & 0x10)==0x10)
    {
    PORTA|=(1<<PORTA7);
    while(count<5)
    {
    _delay_ms(2000);
    count++;
    }
    count=0;
    PORTA|=(0<<PORTA7);
    k=0;
    }
    }
    }

    ReplyDelete
  3. i don`t now..
    excute. 5% right. if else to system informations.database to insert.
    but,system send to database code?..hex? or c#?
    "c" include my system run.exe view to checking test
    read database write.

    ReplyDelete