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 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 last
arye s
arye85

posted on 2013/07/04 07:19:12 AM CEST

Measurement

sine wavw genrater

i am nwe to programing with pics and am trying to produce a sine wave with a freq. and amp. that are detrmend by the user in the code.
i am having truble in writing the code, if any one can asist i will be gratefull..
i have the easypic 7 with 18f45k22 pic

Raphael Lang
rapheal

posted on 2013/06/01 02:14:47 PM CEST

Measurement

PIC32 MPU 6050 Accelerator I2C LIB

Dear all,

Would be cool there is a LIB for this common Accelerator MPU 6050.
Its quite common chip and used in many smartphone. Qould be cool there is code easy to go

thx

Raph

iverson nair
iverson

posted on 2013/05/20 06:56:58 AM CEST

Measurement

how to link two projects

hi im new at programming. i have compilled two different sorce codes and want to use one chip to run both programms.
when i build them in mikroc pro the software builds but only the first program works. i have test the programs buy building the individualy and they work, but if put together i have a problem . can any one please assist me



//*my first project**************************************************************
//* AUTHOR: IVERSON NAIR
//* DATE : 19/05/2013
//* PROJECT: pic 16f887, with lm35 ; button on ports
//*


unsigned int adc_value;
long temp;
char value [15];
char *degs = "00.00";
void main() {
char TEST = 5; // Constant TEST = 5
enum outputs {RELAY = 3}; // Constant RELAY = 3


float result;
unsigned char lcd_value[15];
int temp_flag=0;
const low_temp=25.00;
const high_temp=26.00;

TRISC7_bit=0;
ADC_Init();
RC7_bit=0;


ADCON0 = 0b01010000; // Fosc/32, RA2 input
ADCON1 = 0b10000001; // Ra3 = Vref, all analog = 2.5V
TRISB = 0x00; // PORTB All Outputs

TRISA = 0xFF; // PORTA All Inputs

while(1) {
result = ADC_Read(2);
temp = result/2.048;


FloatToStr(temp,lcd_value);




if(temp<low_temp){
RC7_bit=1;
temp_flag=1;
}
else if (temp>high_temp){
RC7_bit=0;
temp_flag=0;
}
else if (temp<=high_temp && temp>=low_temp){
if(temp_flag==1){
RC7_bit=1;
}
else{
RC7_bit=0;
}
}
else {
RC7_bit=0;

}
}
}
void main1() {

char TEST = 5; // Constant TEST = 5
enum outputs {RELAY = 3}; // Constant RELAY = 3



ANSEL = 0;
ANSELH = 0;
PORTB = 0 ; // Reset port B
TRISB= 0xFF; // All portb pins are configured as inputs
PORTD = 0; // Reset port D
TRISD = 0b11110011; // Pin RD3 is configured as an output, while the rest are
// configured as inputs


do {

if (Button(&PORTB,0,1,1)) // Does the number in timer match constant TEST?
(PORTD.RELAY = 1); // Numbers match. Set the RD3 bit (output RELAY)


if (Button(&PORTB,1,1,1)) // Does the number in timer match constant TEST?
(PORTD.RELAY = 1); // Numbers match. Set the RD3 bit (output RELAY)


if (Button(&PORTB,5,1,1)) // Does the number in timer match constant TEST?
(PORTD.RD2 = 1); // Numbers match. Set the RD2 bit (output DBW)

}
while (1); // Remain in endless loop
}

Eric Gislason
kyndsi

posted on 2013/04/21 04:37:35 PM CEST

Measurement

Simple counter with hold/reset

I am in need of programming for a simple input pulse counter that will hold its count over power cycling, and reset to zero on demand. For use with PIC16F628A and 4 digit 7 segment common cathode display. Input pulse comes from a basic NPN sensor switch.

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.

first | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 last