Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Sort By

USER REQUESTS

first | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 last
Rafal Nowak
fonak

posted on 2011/10/22 10:22:50 AM CEST

Graphics & LCD

ILI9325 Driver code

Hi
Does anyone have a code or a library ( MikroC ) for ILI9325 color TFT LCD controller ?

Emmanuel Edwards
eddienuel

posted on 2011/10/21 05:53:56 PM CEST

Measurement

quadrature decoder

hello, please i need help on how to decode the quadrature signals from mechanical mouse for direction, using pic16f887 or 18f4520.
i will appreciate any solution in mikroC ,links and schematics or just an advice on how to go about it thanks

Giuradei Francesco
grandegiove

posted on 2011/10/21 11:42:04 AM CEST

Storage

FLASH MEmory to store data

I need a code to store data in a PIC32 flas memory. Thanks a lot. Regards.

coskunkazma
coskunkazma

posted on 2011/10/20 06:05:06 AM CEST

Other Codes

UART interrupt

Dear Sir,

EUSART interrupt, I have written below lines

INTCON.GIE = 1;
INTCON.PEIE = 1;
PIR1.RC1IF = 1;
PIE1.RC1IE = 1 ;

But still EUSART interrupt does not work. U have any idea. Also may my mistake be in project setup

Peter Bieri
BieriP

posted on 2011/10/19 08:02:39 AM CEST

Communication

INitialize mmc

hi i wana use a MMC card. i hve the impression that the buffer is overfloding.
could someone check the code and tell me what i did wrong....

Code:

void sd_card_init()
{
// Initialisiere SPI für MMC Zugriff
SPI2_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, 64, _SPI_SS_DISABLE, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_HIGH, _SPI_ACTIVE_2_IDLE);
Delay_ms(10);

// Initialize MMC
if (!Mmc_Fat_Init())
{
// Falls MMC Init nicht i.O. ist SPI schneller initialisieren.
SPI2_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, 4, _SPI_SS_DISABLE, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_HIGH, _SPI_ACTIVE_2_IDLE);
}




}

void sd_card_read()
{
int zi = 0, zb = 0, zc = 0 ,zd = 0; // Schlaufenzähler
Mmc_Fat_Assign("config.txt", 0); //File config.txt öffnen
Mmc_Fat_Reset(&size); //grösse des Files auslesen und in size speichern

//File Auslesen und in buffer schreiben
for (zi = 1; zi <= size; zi++)
{
Mmc_Fat_Read(&buffer[0]);
//Wenn ein "-" (ASCII Code 45)
if (buffer[0] == 45)
{
zb = 0;
//Hier wird eine Zeile eingelesen (bis zum nächsten CR ASCII 13)
//oder 200 Zeichen eingelesen wurden
while (buffer [zb] != 13)
{
zb++;
Mmc_Fat_Read(&buffer[zb]);
if (zb == 200) break;
}

//Die ersten 4 Bytes des buffer werden in das Kommandobyte kopiert
zc = 0; //Schlaufenzähler auf 0 setzen
while (zc != 4) //Schlaufe um 4 bytes zu lesen
{
buffer_kdo[zc] = buffer[zc+1];
zc++;
}

//Byte 6 bis Byte 26 werden in buffer_ebene gespeichert
zd = 0; //Schlaufenzähler auf 0 setzen
while (zd != 20) //Schlaufe um 20 bytes zu lesen
{
buffer_ebene[zd] = buffer[zd+6];
zd++;
}
fill_vars();
}
}
}


void fill_vars()

{
//In dieser Funktion wird ein gefülltes Kommandobyte und Ebenenbyte
//vom Puffer in die entsprechende Variable ebenen_bez abgefüllt
//
//Funktionsinterne Variablendeklaration
int ebene_einer = 0 , ebene_zehner=0, ebene_total =0; //Ebenen Vraiablen
int ia = 0, i=0; //Schlaufen Variablen
//oder Ebenen Text

if (buffer_kdo[0] != 'E') return;
if (buffer_kdo[1] == 'B')

{
ebene_einer = buffer_kdo[3]-48;
ebene_zehner = buffer_kdo[2]-48;
ebene_total = (ebene_zehner * 10) + ebene_einer;
//4 Bytes Ebenentext in entsprechendes Array abfüllen
while (ia != 5)
{
ebenen_bez [ebene_total] [ia] = buffer[ia+6];
ia++;
}
}

//Ebenen Text in Array kopieren
ia = 0;
if (buffer_kdo[1] == 'T')
{
ebene_einer = buffer_kdo[3]-48;
ebene_zehner = buffer_kdo[2]-48;
ebene_total = (ebene_zehner * 10) + ebene_einer;
//Bytes Ebenentext in entsprechendes Array abfüllen
while (ia != 28)
{
ebenen_text [ebene_total] [ia] = buffer[ia+6];
ia++;
}
}

for (i = 0; i <= 128; i++)
{
buffer[i] = 0;
}
}

thanks

first | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 last