View previous topic :: View next topic |
Author |
Message |
horde_fuego
Joined: 31 Mar 2009 Posts: 11
|
TRISA instruction is deprecated for PIC1684 |
Posted: Fri Apr 24, 2009 5:07 am |
|
|
From proteus simulation log: TRISA instruction is deprecated for PIC1684
TRISB instruction is deprecated for PIC1684
Hello everyone!! I am a beginner in PIC programming and C language. I want to ask how I can remove this simulation log from proteus whenever I run the program. Here is my code:
Code: |
#include "C:\Documents and Settings\user\My Documents\picc project\multiplexing_leds.h"
//#define PAUSE delay_ms(100) //change the value to vary the delay
byte x[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
void count_up();
void count_down();
void delay(long int halt);
void main()
{
set_tris_a(0x1E);
set_tris_b(0x00);
while(1)
{
count_up();
count_down();
}
}
void count_up()
{
int y;
output_high(PIN_A0);
for(y=0;y<10;y++)
{
output_b(~x[y]);
//PAUSE;
delay(32767);
}
//break;
}
void count_down()
{
int z;
output_high(PIN_A0);
for(z=8;z>0;z--)
{
output_b(~x[z]);
//PAUSE;
delay(65534);
}
output_b(~x[0]);
//break;
}
void delay(long int halt)
{
long int i;
for(i=0;i<=halt;i++)
;
}
|
It runs successfully but the simulation log is still there. How can I remove this? Is there a problem with my code? What is bit masking anyway? How can I use that to remove the simulation log? Don't I have to use set_tris_x anymore?
Any suggestions/comments will be highly appreciated. Thanks a lot!! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
horde_fuego
Joined: 31 Mar 2009 Posts: 11
|
|
Posted: Fri Apr 24, 2009 9:48 am |
|
|
thanks PCM programmer!!!from what i have read, does this mean that using set_tris_x instruction is alright & there is nothing wrong with the log?and it's okay if its the old PIC16f84A?
anyways thanks a lot for the help!! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Apr 24, 2009 10:32 am |
|
|
Yes it's OK to use the TRISA and TRISB instructions on the 16F84a.
Just ignore the log. |
|
|
|