Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hello swapan in setting you said
also check the box against "Open Edit Project Window to set configuration bits" and finally hit Next) - Next - Next - i din't found ,please tell me again step by step setting config
please
In the screenshots in post #22, it shows the device is a PIC12F675 and in post #21 the device is shown as a PIC16C73B.
Can I suggest that you use the same device in your examples that the OP says he is using.
Also the difference the OP is referring to in the HEX files is probably for the CONFIG word which may well depend on the actual device the compiler thinks it is generating code for.
Susan
Finally got the same output....
After selecting INTOSC oscillator :IO function on RA4/OSC2/CLKOUT
and disabling MCLR i got same .hex file.
Thanku Okada and swapan....
I had used external Oscillator.
This is .hex using INT oscillator
:020000001528C1
:0C000600831221088A00200882000800F4
:1000120003208A110A128000840AA00A0319A10A85
:08002200D003031D09280800AA
:10002A000730831299008316910187018312870191
:10003A0087090330DB008A30DC005530DD00DD0B38
:10004A002428DC0B2428DB0B2428000000001D28B0
:02005A002D284F
:02400E00D431AB
:00000001FF
This is .hex file using HS oscillator.
:020000001528C1
:0C000600831221088A00200882000800F4
:1000120003208A110A128000840AA00A0319A10A85
:08002200D003031D09280800AA
:10002A000730831299008316910187018312870191
:10003A0087090330DB008A30DC005530DD00DD0B38
:10004A002428DC0B2428DB0B2428000000001D28B0
:02005A002D284F
:02400E00D231AD
:00000001FF
And this is .hex file you have uploaded in post #10..
:020000001528C1
:0C000600831221088A00200882000800F4
:1000120003208A110A128000840AA00A0319A10A85
:08002200D003031D09280800AA
:10002A000730831299008316910187018312870191
:10003A0087090330DB008A30DC005530DD00DD0B38
:10004A002428DC0B2428DB0B2428000000001D28B0
:02005A002D284F
:02400E00D431AB
:00000001FF
#define pin_a PORTC.RC5
#define pin_2a PORTA.RA4
#define pin_b PORTC.RC4
#define pin_2b PORTA.RA5
#define pin_c PORTC.RC0
#define pin_2c PORTC.RC3
#define pin_d PORTC.RC3
#define pin_2d PORTC.RC0
#define pin_e PORTC.RC1
#define pin_2e PORTC.RC2
#define pin_f PORTA.RA4
#define pin_2f PORTC.RC5
#define pin_g PORTA.RA5
#define pin_2g PORTC.RC4
#define pin_dp PORTC.RC2
#define pin_2dp PORTC.RC1
#define cc_1 PORTA.RA2
#define cc_2 PORTA.RA1
unsigned char unit,dec,hun,i,j,value=0;
void display()
{
switch(unit)
{
case 0: pin_a=1;pin_b=1;pin_c=1;pin_d=1;pin_e=1;pin_f=1;pin_g=0;pin_dp=1;
break;
case 1: pin_a=0;pin_b=1;pin_c=1;pin_d=0;pin_e=0;pin_f=0;pin_g=0;pin_dp=1;
break;
case 2: pin_a=1;pin_b=1;pin_c=0;pin_d=1;pin_e=1;pin_f=0;pin_g=1;pin_dp=1;
break;
case 3: pin_a=1;pin_b=1;pin_c=1;pin_d=1;pin_e=0;pin_f=0;pin_g=1;pin_dp=1;
break;
case 4: pin_a=0;pin_b=1;pin_c=1;pin_d=0;pin_e=0;pin_f=1;pin_g=1;pin_dp=1;
break;
case 5: pin_a=1;pin_b=0;pin_c=1;pin_d=1;pin_e=0;pin_f=1;pin_g=1;pin_dp=1;
break;
case 6: pin_a=1;pin_b=0;pin_c=1;pin_d=1;pin_e=1;pin_f=1;pin_g=1;pin_dp=1;
break;
case 7: pin_a=1;pin_b=1;pin_c=1;pin_d=0;pin_e=0;pin_f=0;pin_g=0;pin_dp=1;
break;
case 8: pin_a=1;pin_b=1;pin_c=1;pin_d=1;pin_e=1;pin_f=1;pin_g=1;pin_dp=1;
break;
case 9: pin_a=1;pin_b=1;pin_c=1;pin_d=1;pin_e=0;pin_f=1;pin_g=1;pin_dp=1;
break;
}
}
void display2()
{
switch(dec)
{
case 0: pin_2a=1;pin_2b=1;pin_2c=1;pin_2d=1;pin_2e=1;pin_2f=1;pin_2g=0;pin_2dp=0;
break;
case 1: pin_2a=0;pin_2b=1;pin_2c=1;pin_2d=0;pin_2e=0;pin_2f=0;pin_2g=0;pin_2dp=0;
break;
case 2: pin_2a=1;pin_2b=1;pin_2c=0;pin_2d=1;pin_2e=1;pin_2f=0;pin_2g=1;pin_2dp=0;
break;
case 3: pin_2a=1;pin_2b=1;pin_2c=1;pin_2d=1;pin_2e=0;pin_2f=0;pin_2g=1;pin_2dp=0;
break;
case 4: pin_2a=0;pin_2b=1;pin_2c=1;pin_2d=0;pin_2e=0;pin_2f=1;pin_2g=1;pin_2dp=0;
break;
case 5: pin_2a=1;pin_2b=0;pin_2c=1;pin_2d=1;pin_2e=0;pin_2f=1;pin_2g=1;pin_2dp=0;
break;
case 6: pin_2a=1;pin_2b=0;pin_2c=1;pin_2d=1;pin_2e=1;pin_2f=1;pin_2g=1;pin_2dp=0;
break;
case 7: pin_2a=1;pin_2b=1;pin_2c=1;pin_2d=0;pin_2e=0;pin_2f=0;pin_2g=0;pin_2dp=0;
break;
case 8: pin_2a=1;pin_2b=1;pin_2c=1;pin_2d=1;pin_2e=1;pin_2f=1;pin_2g=1;pin_2dp=0;
break;
case 9: pin_2a=1;pin_2b=1;pin_2c=1;pin_2d=1;pin_2e=0;pin_2f=1;pin_2g=1;pin_2dp=0;
break;
}
}
void main()
{
int x;
CMCON = 0x07;
TRISA= 0x01;
TRISC =0x00;
ANSEL = 0X01;
ADCON0=0X81;
ADCON1=0X30;
for(x=0;x<300;x++)
{
value = ADCON0;
hun=value/100;
value=value-hun*100;
dec=value/10;
unit=value-dec*10;
cc_1=1;cc_2=0;
display();
delay_ms(100);
cc_1=0;cc_2=1;
display2();
delay_ms(100);
}
}