boukamoha
Member level 5
problems in library of mikroc pro v1.65
hi every one
i'm doing now one application using the sd card with spi interfacing to the serial COM , i followed an example in book Advanced PIC Microcontroller
Projects in C: From USB to RTOS with the PIC 18F Series , but when i wanted to initialize the spi bus as the author did , unfortunetely i couldn't find the right function like he has.. the author function for spi bus initialization is :
Spi_Init_Advanced(MASTER_OSC_DIV16,DATA_SAMPLE_MIDDLE,CLK_IDLE_LOW, LOW_2_HIGH);
other wise i have in my library the function :
SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV4,_SPI_DATA_SAMPLE_MIDDLE,_SPI_CLK_IDLE_LOW,_SPI_LOW_2_HIGH); and it doesn't work at all.
the second question is :
please can some one tell me why the author used the function in this format
while(Mmc_Init(&PORTC,2));
because in my opinion the function Mmc_Init() doesn't have arguments .
the third question :
why i don't have a CAN library and i have just spi_CAN?should i do some thing to download it?or my version of mikroc pro is old?
i hope some one can give me a clear responses
thx in advance
hi every one
i'm doing now one application using the sd card with spi interfacing to the serial COM , i followed an example in book Advanced PIC Microcontroller
Projects in C: From USB to RTOS with the PIC 18F Series , but when i wanted to initialize the spi bus as the author did , unfortunetely i couldn't find the right function like he has.. the author function for spi bus initialization is :
Spi_Init_Advanced(MASTER_OSC_DIV16,DATA_SAMPLE_MIDDLE,CLK_IDLE_LOW, LOW_2_HIGH);
other wise i have in my library the function :
SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV4,_SPI_DATA_SAMPLE_MIDDLE,_SPI_CLK_IDLE_LOW,_SPI_LOW_2_HIGH); and it doesn't work at all.
the second question is :
please can some one tell me why the author used the function in this format
while(Mmc_Init(&PORTC,2));
because in my opinion the function Mmc_Init() doesn't have arguments .
the third question :
why i don't have a CAN library and i have just spi_CAN?should i do some thing to download it?or my version of mikroc pro is old?
i hope some one can give me a clear responses
thx in advance
Last edited: