Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

'No model specified' for proteus

Status
Not open for further replies.

karthi06

Junior Member level 2
Junior Member level 2
Joined
Jan 16, 2014
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
209
hello,
i'm still new to proteus and currently working on impact sensing circuit.However,i'm facing some errors once i try to simulate the circuit, as the errors,'no models specified' is being displayed upon the simulation. Thus, i really need some suggestions and guidelines from you guys.Thank you very much.Below are the image of my circuit: circuit.jpg
 

As you have said before, i have clicked all the connectors and checked the 'Exclude from Simulation' options, and the circuit shows no error upon simulation. However the lcd screen doesn't display anything,even though i have inserted the specific coding,as shown below:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Lcd pinout settings
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
 
// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
 
void main() 
{
 Lcd_Init();
 Lcd_Out(1, 1, "Hello!");
 Lcd_Cmd(_LCD_CURSOR_OFF);
 
}



your reply would be most welcomed. :)
 
Last edited by a moderator:

Try this code. Also Connect Vss of LCD to GND and Vdd and Vee pins to +5V and pot respectively. If you are testing in hardware then according to your LCD connections the LCD will be dead. Also you have to pull up MCLR pin. You have connected to GND. It will keep the processor in RESET state.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Lcd pinout settings
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
 
// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
 
void main() 
{
    TRISB = 0x00;
    PORTB = 0x00;
 
    Lcd_Init();
    Lcd_Cmd(_LCD_CURSOR_OFF);
    Lcd_Cmd(_LCD_CLEAR);    
    Lcd_Out(1, 1, "Hello!");
    
    while(1){
 
 
 
    }
 
}

 

Is this the connection that u mean ?lcd.jpg

I also have few questions:

1. Where should i pull up the MCLR pin to ?
2.what do u mean by,'testing in hardware then according to your LCD connections the LCD will be dead'....is that mean that the output is achievable only if using proteus and not by using hardware (in real life) ?
 

The LCD connections shown in post #6 is right. Connect MCLR pin to +5V through a 10k resistor. I meant if you are testing in hardware and not only in Proteus, then if you had connected LCD as in post #1 then LCD will be already dead due to applying reverse voltage.
 

OH..thanks for the help :)

- - - Updated - - -

one more help..i've another string of codings,as shown below:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void main()
 
while(true)
 
  if(input(PIN_DO))
  {
  output_bit(PIN_D1,0);
  printf("No Detect\n\r");
  delay_ms(500);
  }
   else
  {
  output_bit(PIN_D1,1);
  printf("\fDETECT1\n\r");
  delay_ms(500);
  }
}//close while
}//close main



The problem is,once i tried to paste the above coding with the previous one,it displays error in simulation.I used microC PRO for PIC for your attention.
 
Last edited by a moderator:

oh, the codings are from different softwares,is it ? Then how i need to change the above coding,so that it will compile with lcd coding ? and yes microC gives the error when i compile the above coding with lcd coding.
 


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
TRISD = 0x01;
PORTD = 0x00;
 
 
while(1){
 
    if(PORTD.F0){
        Delay_ms(50);
        if(PORTD.F0){
            PORTD.F1 = 0;
            LCD_Out(2,1,"No Detect");
        }
    }
    else if(!PORTD.F0){
        Delay_ms(50);
        if(!PORTD.F0){
            PORTD.F1 = 1;
            LCD_Out(2,1,"Detect   ");
        }
    }
 
}

 

Thank for the code,however the microC displays error upon compiling the above coding with previous code (lcd)
 

This is the code:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Lcd pinout settings
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
 
// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
 
char txt1[] = "999";
char txt2[] = "012-3456789";
char txt3[] = "013-3456789";
char txt4[] = "014-3456789";
 
char i;                              // Loop variable
 
void Move_Delay() {                  // Function used for text moving
  Delay_ms(500);                     // You can change the moving speed here
}
 
void main(){
 
  Lcd_Init();                        // Initialize LCD
  while(1) {
  Lcd_Cmd(_LCD_CLEAR);               // Clear display
  Lcd_Cmd(_LCD_CURSOR_OFF);          // Cursor off
  Lcd_Out(1,1,txt1);                 // Write text in first row
 
  Lcd_Out(2,1,txt2);                 // Write text in second row
  Delay_ms(3000);
 
  // Moving text
   for(i=0; i<11; i++) {               // Move text to the right 11 times
    Lcd_Cmd(_LCD_SHIFT_RIGHT);
    Move_Delay();
   }
   for(i=0; i<11; i++) {             // Move text to the left 11 times
      Lcd_Cmd(_LCD_SHIFT_LEFT);
      Move_Delay();
   }
 
  Lcd_Cmd(_LCD_CLEAR);               // Clear display
 
  Lcd_Out(1,1,txt3);                 // Write text in first row
  Lcd_Out(2,1,txt4);                 // Write text in second row
  Delay_ms(3000);
 
  // Moving text
   for(i=0; i<11; i++) {               // Move text to the right 11 times
    Lcd_Cmd(_LCD_SHIFT_RIGHT);
    Move_Delay();
   }
   for(i=0; i<11; i++) {             // Move text to the left 11 times
      Lcd_Cmd(_LCD_SHIFT_LEFT);
      Move_Delay();
   }
 }
}
 
 
 
 
TRISD = 0x01;
PORTD = 0x00;
 
 
while(1){
 
    if(PORTD.F0){
        Delay_ms(50);
        if(PORTD.F0){
            PORTD.F1 = 0;
            LCD_Out(2,1,"No Detect");
        }
    }
    else if(!PORTD.F0){
        Delay_ms(50);
        if(!PORTD.F0){
            PORTD.F1 = 1;
            LCD_Out(2,1,"Detect   ");
        }
    }
 
}
 
}
 
}



By the way,how to wr
 
Last edited by a moderator:

Read some C book.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Lcd pinout settings
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
 
// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
 
char txt1[] = "999";
char txt2[] = "012-3456789";
char txt3[] = "013-3456789";
char txt4[] = "014-3456789";
 
char i, j; // Loop variable
 
void Move_Delay() { // Function used for text moving
    Delay_ms(500); // You can change the moving speed here
}
 
void main(){
 
    TRISB = 0x00;
    PORTB = 0x00;
    TRISD = 0x01;
    PORTD = 0x00;
 
    Lcd_Init(); // Initialize LCD
    Lcd_Cmd(_LCD_CLEAR); // Clear display
    Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
 
    Lcd_Out(1,1,txt1); // Write text in first row
    Lcd_Out(2,1,txt2); // Write text in second row
    Delay_ms(3000);
 
    for(j = 0; j < 2; j++){
        // Moving text
        for(i=0; i<11; i++) { // Move text to the right 11 times
            Lcd_Cmd(_LCD_SHIFT_RIGHT);
            Move_Delay();
        }
    
        for(i=0; i<11; i++) { // Move text to the left 11 times
            Lcd_Cmd(_LCD_SHIFT_LEFT);
            Move_Delay();
        }
 
        Lcd_Cmd(_LCD_CLEAR); // Clear display
        Lcd_Out(1,1,txt3); // Write text in first row
        Lcd_Out(2,1,txt4); // Write text in second row
        Delay_ms(3000);
    }
 
    while(1){
 
        if(PORTD.F0){
            Delay_ms(50);
            if(PORTD.F0){
                PORTD.F1 = 0;
                LCD_Out(2,1,"No Detect");
            }
        }
        else if(!PORTD.F0){
            Delay_ms(50);
            if(!PORTD.F0){
                PORTD.F1 = 1;
                LCD_Out(2,1,"Detect ");
            }
        }
    }
}

 
Last edited:
thank you very much for the coding. Do you know how to write coding in order to display gps location(longitude & latitude) to specified number in form of sms using gsm modem ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top