CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

TRISA instruction is deprecated for PIC1684

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
horde_fuego



Joined: 31 Mar 2009
Posts: 11

View user's profile Send private message

TRISA instruction is deprecated for PIC1684
PostPosted: Fri Apr 24, 2009 5:07 am     Reply with quote

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!! Razz Razz Very Happy
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 24, 2009 8:52 am     Reply with quote

Read this thread. It's a 2-page thread. Read both of them:
http://www.ccsinfo.com/forum/viewtopic.php?t=21253&highlight=tris
horde_fuego



Joined: 31 Mar 2009
Posts: 11

View user's profile Send private message

PostPosted: Fri Apr 24, 2009 9:48 am     Reply with quote

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!! Very Happy Very Happy Very Happy Smile Smile
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 24, 2009 10:32 am     Reply with quote

Yes it's OK to use the TRISA and TRISB instructions on the 16F84a.
Just ignore the log.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group