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.

[PIC] Building issues with mikroC using pic18f252

Status
Not open for further replies.

flamesier

Newbie level 6
Joined
Oct 2, 2010
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,453
hi all,

im trying to build a code for a digital clock and MikroC unable to build the code.
please see below image for details. anything i missed out on this? how to declare the required?
some help on this would be great. if you need the full code, please let me know.
 

Attachments

  • 1.JPG
    1.JPG
    89.2 KB · Views: 79

hello

respect the case ..et number of SPI

Code:
void SPIx_Init_Advanced(unsigned short master_slav, unsigned short data_sample, unsigned short clock_idle, unsigned short transmit_edge);

SPI1_Init_Advanced( ...

and Soft_I2C_Config does not exist
you must declare the pin to build your own config
like example
Code:
// Software I2C connections
sbit Soft_I2C_Scl           at RC0_bit;
sbit Soft_I2C_Sda           at RC1_bit;
sbit Soft_I2C_Scl_Direction at TRISC0_bit;
sbit Soft_I2C_Sda_Direction at TRISC1_bit;
// End Software I2C connections

Code:
void Soft_I2C_Init();

read explanation in MikroC Libraries
 

hello,


I did many changes in the original source to be able to get a good compiling result (without error)
but not tested at all, because, no hardware ,no proteus simulator

Software I2C config doen't exist -> Software I2C init + hardware config via sbit ... read mikroC lib explanation
SPI need SPI1 word , and parameters were not reconnized .. read mikroC lib explanation
be carreful with the case of reserved word .. like Delay_ms (not delay_ms)
Don't use reserved word like adress or data .. used by the compiler replaced by addr and valeur
you can see inside the new source all the changes.
and result of compiling.

projet complet :
View attachment Clock_18F252_10Mhz.zipView attachment Clock_18F252_10Mhz.zip
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top