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 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 last
asma alekar
alekarasma

posted on 2013/08/13 03:29:58 AM CEST

Other Codes

how to install FT800 library

hello everyone....can anyone plz tell me the procedure to how to install ft800 library in mikro c compiler from libstock site....but the file extension is .mpkg and when i added it to the uses folder it is not getting update...plz reply..its urgent

asma alekar
alekarasma

posted on 2013/08/12 05:06:19 AM CEST

asma alekar
alekarasma

posted on 2013/08/12 02:16:51 AM CEST

Other Codes

how to start ft800 eve breakout board

hello everyone....i am new with dis board.actually its not a development board...i have a p18f4520 dev board and pickit2 compiler & i want to interface ft800 eve breakout board....can anyone tell me is it possible to do the interfacing with all these thing i have.....

chuck jr
chuckjr

posted on 2013/08/08 05:58:50 AM CEST

Audio & Speech

earthquake detector using gyroscope

I need help for the I2C zilog program master and slave function using 3-axis gyroscope. anyone knows a program about this? we really need this for our project study. thanks

Henk Kiela
hkiela

posted on 2013/08/01 07:20:13 AM CEST

Internal MCU modules

Pascal Sample code for quadrature encoders with STM32F407GT

I have tried a lot to get any of the four possible 16 quad encoder counters (Tim2 -5) running, with no success. Can anyone have a suggestion? See my sample code below.

// --------------- Init encoder
Procedure EncoderInit;
Begin
//Configure peripheral clocks


//Configure pins
GPIO_Config(@GPIOC_BASE, _GPIO_PINMASK_6 or _GPIO_PINMASK_7,
_GPIO_CFG_MODE_INPUT or _GPIO_CFG_PULL_UP or _GPIO_CFG_MODE_ALT_FUNCTION or _GPIO_CFG_SPEED_100MHZ); // Pin ChA and chB config
// GPIO_Config(@GPIOC_BASE, _GPIO_PINMASK_6 or _GPIO_PINMASK_7,
// _GPIO_CFG_MODE_INPUT or _GPIO_CFG_PULL_UP or _GPIO_CFG_SPEED_100MHZ); // Pin ChA and chB config

CEN_TIM3_CR1_bit:=0; // Disable timer
CEN_TIM4_CR1_bit:=0; // Disable timer

AFRL60_GPIOC_AFRL_bit:=0; //GPIOc_AFRH alternate function AF2 for PC6
AFRL61_GPIOC_AFRL_bit:=1;
AFRL62_GPIOC_AFRL_bit:=0;
AFRL63_GPIOC_AFRL_bit:=0;

AFRL70_GPIOC_AFRL_bit:=0; //GPIOc_AFRH alternate function AF2 for PC7
AFRL71_GPIOC_AFRL_bit:=1;
AFRL72_GPIOC_AFRL_bit:=0;
AFRL73_GPIOC_AFRL_bit:=0;

TIM3_ARR:=3000;
TIM4_ARR:=3000;

CC1S0_TIM3_CCMR1O_bit:=1; // Tim3_CCMR1 input mapping T1 map
CC1S1_TIM3_CCMR1O_bit:=0;

CC2S0_TIM3_CCMR1O_bit:=1; // Tim3_CCMR1 input mapping T2 map
CC2S1_TIM3_CCMR1O_bit:=0;

//Configure Timer
CC1P_TIM3_CCER_bit:=0; // Tim3_CCER Input polarity
CC2P_TIM3_CCER_bit:=0;

//Debounce filter

//Setup quadrature encoder and enable timer
// TIM3_SMCR
// Main Configuration of Timer 3: Tim3_SMCR.SMS -> Encoder Mode 3 (val 011)
SMS0_TIM3_SMCR_bit:=1; // Count on edge ch1
SMS1_TIM3_SMCR_bit:=1; // and channel 2
SMS2_TIM3_SMCR_bit:=0;
// SMS2_TIM3_SMCR_bit:=0;
ETF0_TIM3_SMCR_bit:=1;
ETF1_TIM3_SMCR_bit:=1;
ETF2_TIM3_SMCR_bit:=1;
ETF3_TIM3_SMCR_bit:=1;

// CC2P= ‘0’, CC2NP = ‘0’, IC2F =’0000’ (TIMx_CCER register, TI2FP2 noninverted, TI2FP2=TI2)

//Tim3_SMCR.TS -> TI1FP1 (val 101)
//Tim3_CR1.URS -> Counter over-/underflow, UG BIT, Slave mode controller (val 0)
//Tim3.ARR -> 1000
//Timer 3 Channel 1 Configuration: Tim3_CCR1 -> 0
//Tim3_CCMR1.CC1S -> CC1 configured as input, IC1 mapped on TI1 (val 01)
//Tim3_CCER.CC1P -> non-inverted (val 0)
//Timer 3 Channel 2 Configuration: Tim3_CCR2 -> 0
//Tim3_CCMR1.CC2S -> CC2 configured as input, IC2 mapped on TI2 (val 01)
//Tim3_CCER.CC2P -> non-inverted (val 0)

CEN_TIM3_CR1_bit:=1; // Enable timer
End; // Encoderinit

Function Getcount: word;
var a: integer;
begin
CEN_TIM3_CR1_bit:=0; // Enable timer
TIM3_CNT:=222;
CEN_TIM3_CR1_bit:=1; // Enable timer
GetCount:=TIM3_CNT;
// a:=__System_CLOCK_IN_KHZ;
// Getcount:=a;
end;

first | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 last