|
|
View previous topic :: View next topic |
Author |
Message |
NeoMatrix
Joined: 03 May 2005 Posts: 23
|
Header Files Needed PIC16F84A , PIC16F628 |
Posted: Wed May 04, 2005 12:10 am |
|
|
Hello everyone
i don't have headerfiles of PIC16F84A and PIC16f628 if anybedy have pls can send me i can't able to write the code of this pic
this my mail id mdaslam23@Hotmail.com
thanking you
plsssssssssss |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Wed May 04, 2005 1:53 am |
|
|
Header files are useless without the Devices.dat file. |
|
|
NeoMatrix
Joined: 03 May 2005 Posts: 23
|
Header Files Needed PIC16F84A , PIC16F628 |
Posted: Wed May 04, 2005 1:57 am |
|
|
hello
i downloaded the ccs demo when i am compiling this programm its shows that p16c84.h Unknown Device Type in the Devices folder i have only p15c84 when i use this then also its displaying the same thing so i just putted 16F877A.h header file this is my code
#include <16F877A.h>
#USE DELAY( CLOCK=4000000 ) /* Using a 4 Mhz clock */
#FUSES XT,NOWDT,NOPROTECT,NOPUT
/* Use XT mode, No Watch Dog, No Code Protect, No Power-up Timer */
#byte port_b=6 /* define the location of register port_b */
#byte port_a=5 /* define the location of register port_b */
char const pat[34]={0x7F,0x08,0x08,0x08,0x7F,0x00,0x7F,0x49,0x49,0x41,0x41,0x00,0x7F,0x01,0x01,0x01,0x01,0x00,0x7F,0x01,0x01,0x01,0x01,0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00,0x00,0x00,0x00};
main(){
char cnt, cnt2, scrollcnt, col;
set_tris_b(0); /* set port_b as outputs */
set_tris_a(0); /* set port_a as output */
port_b = 0; /* ZERO port_a & port_b */
port_a = 0;
scrollcnt = 0;
cnt2 = 0;
while(1) // Infinite loop to avoid run on code
{
col = 0b00000001; // The column that we are driving
++scrollcnt; // scrollcnt is used as a delay before we switch columns
if (scrollcnt == 250)
{
scrollcnt = 0;
++cnt2;
if (cnt2 == 34)
cnt2 = 0;
}
for(cnt = 0;cnt < 5;cnt++)
{
port_a = 0; // Turn off any previous data displayed
port_b = pat[cnt+cnt2]; // Setup the data to display
port_a = col; // Display the new data
delay_ms(1); // Give some delay before we output the next column
col<<=1; // Rotate our mask for the next column
}
}
}
so i think that may be i need those header files can u explain me pls
thank for the reply |
|
|
Ttelmah Guest
|
|
Posted: Wed May 04, 2005 5:10 am |
|
|
The demo, only supports the 16F877, 16C544, and the 18F458. Adding the header files, _will not change this_. If you wan't to compiler for the 16C84, then I'm afraid you will have to buy the compiler.
Best Wishes |
|
|
NeoMatrix
Joined: 03 May 2005 Posts: 23
|
Header Files Needed PIC16F84A , PIC16F628 |
Posted: Wed May 04, 2005 1:13 pm |
|
|
Hello telmah
thank for the info i don't no about this i am trying to compile for long time coz i have P16PRO programmer and picallw and winicprog not support 16f877 chip so i changed the code to fit in 16f6282 but its not compiling unless i change the header file to 16f877 any way in demo its not support as my intension is to design the moving message display i have the code but i don't no how to design the circuit
thanks for ur reply |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
|
NeoMatrix
Joined: 03 May 2005 Posts: 23
|
Thank You.. |
Posted: Thu May 05, 2005 1:41 am |
|
|
hello haplo
yes i seen the limitations i think i have to purchase the ccs c compiler i don't no much about c and new to embeded as i want to build the 5 of 5x7 dot matrix moving message for that reason only coz i have only pic16f628 and pic16f84a the p16pro and picallw not support other chips so i am struck i seen the code of moving message so i tried to compile in 628 its not compiling
anyway thanks for ur info |
|
|
|
|
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
|