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 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 last
Jabir J
JAbir

posted on 2014/02/06 08:50:09 PM CET

Measurement

code for reading negative temp

I am using PIC18F4550 and temp sensor LM35 to read both '-' and '+' temperature. I am using Mikrobasic pro for writing the code.can anyone help me to correct the code that i have written...please..?


dim LCD_RS as sbit at LATB4_bit
LCD_EN as sbit at LATB5_bit
LCD_D4 as sbit at LATB0_bit
LCD_D5 as sbit at LATB1_bit
LCD_D6 as sbit at LATB2_bit
LCD_D7 as sbit at LATB3_bit
dim LCD_RS_Direction as sbit at TRISB4_bit
LCD_EN_Direction as sbit at TRISB5_bit
LCD_D4_Direction as sbit at TRISB0_bit
LCD_D5_Direction as sbit at TRISB1_bit
LCD_D6_Direction as sbit at TRISB2_bit
LCD_D7_Direction as sbit at TRISB3_bit

dim R_S as word
dim T as word
dim V as byte
dim temp as string[15]

main:
ADCON0 = 0x00
ADCON1 = 0x00
ADCON2 = 0x00
ADRESL = 1
ADRESH = 0

PORTA=$01 'Initialize port A to 0
PORTB=0 'Initialize port B to $01
TRISA3_bit = 1 ' Configure RA3 pin as input
TRISB=0 ' port B is output


ADC_Init() ' Initialize ADC

Lcd_Init() ' Initialize LCD
Lcd_Cmd(_LCD_CLEAR) ' Clear display
Lcd_Cmd(_LCD_CURSOR_OFF) ' Cursor off

Lcd_Out(1, 1, "Temperature :")
Lcd_Chr(2,8,223) 'char code for degree

Lcd_Chr(2,9,"C") ' Display "C" for Celsius
R_S = 0

While TRUE
R_S= ADC_Get_Sample(3) 'Get 10-bit results of AD conversion
V=R_S*(5/1024) 'convert digital reading to voltage,verf=5 V
T=V*100 'converting this voltage to Celsius, Since sensor's sensitivity is 10mV/C
wordToStr(T,temp)
temp[4] = 0
Lcd_out(2,3, temp) ' Write string in second row
delay_ms(500)
wend

end.

Edson Rocha
especialista

posted on 2014/01/10 02:44:43 AM CET

Measurement

Frequency Counter for Antenna Analysis (up to 400Mhz) using PIC18F4550

Hello all!
Happy new year!

I saw somewhere we can use a combination with Timer0, Timer1 and prescaler values to make a frequency conter up to UHF bands.

Could anyone point me towards the light?
Tried to search in the net but all I've found is up to 50MHz.

The main idea is collect 3 voltages via ADC and the frequency. Then, send them all via USB to a PC.

Thanks in advance!

Roman Toropov
RomanT

posted on 2013/12/15 03:23:10 PM CET

Measurement

examples of using DAC8830 and ADS8341 with ATmega

read and show display each of the channels ADS8341
record in the converter DAC8830 specifying the output level
using the compiler MicroC PRO for AVR

Francis Chaillet
francisr6

posted on 2013/12/09 07:31:09 PM CET

Measurement

Mikromedia + for STM32 ADC for voltage maesurement (C) and IR receiver of Mikromedia Plus STM32

Hello.

I am looking for a developer (i am ready to pay for this help) who could provide me a sample code for voltage measurement (C code)
and another sample C code for IR receiver both for Mikromedia + for STM32.

I opened a post for each demand on the forum without success so far, below are the URL.
http://www.mikroe.com/forum/viewtopic.php?f=12&t=57541
http://www.mikroe.com/forum/viewtopic.php?f=12&t=57504

Thanks a lot for your help.
Francis.

Hamidu Hamisi
Hamidu

posted on 2013/12/05 09:17:26 PM CET

Measurement

Digital scale

Is there any one who knows code of digital scale with callibration codes?

first | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 last