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 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 last
shown shokora
shokorashown

posted on 2013/04/12 07:08:34 AM CEST

Measurement

frequency change detection system

the project uses PIC 16F887 and I'm programming using MPLAB IDE low level assembly language. the microcontroller should be able to detect a change in frequency on an external pulse train and count the number of times the train changes frequency in a five minute period. the train has a resonant frequency of about 80kHz which the microcontroller can determine on just after start-up (after a delay of one minute). thereafter the train changes by about plus or minus 5kHz and after every change it returns to its resonant frequency.

Ahmet Ay
isidur

posted on 2013/04/11 11:32:38 AM CEST

Storage

TFT PIC32 FAT32 file system

Hello,

I want to use FAT32 library (download libstock PIC32) but visual tft supported fat16 library.(not FAT32) What do I need to change? and or visual tft supports fat32
please help me?

how to use global definations (fat 16)

// MMC/SD Connections
sbit Mmc_Chip_Select at LATD12_bit;
sbit Mmc_Chip_Select_Direction at TRISD12_bit;
// end of MMC/SD
// TFT Get Data globals
char Ext_Data_Buffer[512];
unsigned long currentSector = -1, res_file_size;
// end of TFT Get Data

void Init_Ext_Mem() {
//--- set up SPI for the file read
PPS_Mapping(104, _OUTPUT, _SDO3);
PPS_Mapping(98, _INPUT, _SDI3);
PPS_Mapping(79, _OUTPUT, _SCK3OUT);
// Initialize SPI
SPI3_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, _SPI_PRESCALE_SEC_4, _SPI_PRESCALE_PRI_16,
_SPI_SS_DISABLE, _SPI_DATA_SAMPLE_END, _SPI_CLK_IDLE_HIGH, _SPI_ACTIVE_2_IDLE);
Delay_ms(10);

// Initialize MMC
if (!Mmc_Fat_Init()) {
// Reinitialize SPI at higher speed
SPI3_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, _SPI_PRESCALE_SEC_2, _SPI_PRESCALE_PRI_16,
_SPI_SS_DISABLE, _SPI_DATA_SAMPLE_END, _SPI_CLK_IDLE_HIGH, _SPI_ACTIVE_2_IDLE);

// Open resource file for read
Mmc_Fat_Assign("%FILE_NAME", 0);
Mmc_Fat_Reset(&res_file_size);
}
}


char* TFT_Get_Data(unsigned long offset, unsigned int count, unsigned int *num) {
unsigned long start_sector;
unsigned int pos;

start_sector = Mmc_Get_File_Write_Sector() + offset/512;
pos = (unsigned long)offset%512;

if(start_sector == currentSector+1) {
Mmc_Multi_Read_Sector(Ext_Data_Buffer);
currentSector = start_sector;
} else if (start_sector != currentSector) {
if(currentSector != -1)
Mmc_Multi_Read_Stop();
Mmc_Multi_Read_Start(start_sector);
Mmc_Multi_Read_Sector(Ext_Data_Buffer);
currentSector = start_sector;
}

if(count>512-pos)
*num = 512-pos;
else
*num = count;

return Ext_Data_Buffer+pos;
}

Don Pryjmak
digitaldon

posted on 2013/04/09 01:24:56 PM CEST

Measurement

adc to segment 7

The A to D converter from the the help libraries (pic basic pro on easy pic v7) will generated a binary number and light up the led's on the selected port.when the input pot is turned to simulate an analogue signal. I need help to get that number's equivalent decimal to be displayed on the segment seven displays. As an example take that binary number, and displays the decimal equivalent on the 4 segment 7 displays. As an example, binary number 111 would display a 7 , 1000 would be 8 etc etc.

Eventually, I would like to show the thermistor output (after appropriate scaling) as a temperature readout.

Please point me in the right directions.

Muhammad Syafiq Hanippudin
sarpit

posted on 2013/04/09 05:35:30 AM CEST

Measurement

PIC18F452 , ADXL345 , ITG 3200 and MikroC Pro

anyone can help me.....im using pic18f452 and the compiler using MikroC Pro...i want to display the reading from ADXL345 and ITG 3200 using UART...the problem is...the coding...i was try many time to do the coding...but im fail...anyone can help me...sorry because my English is very poor...

Amr Salah
amrsalah

posted on 2013/04/07 09:31:56 AM CEST

Other Codes

Using the serial 7seg 8dig on EasyPICPRO 7

I buy serial 7 seg 8 digits and my new board EasyPICPRO 7 and I am trying to test it by very simple example.
anyone have an example for this.
thanks,

first | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 last