Search Engine

Adc c18

Add Question

Are you looking for?:
c18 example , c18 example , c18 example , c18 example
26 Threads found on Adc c18
Are you using c18 or XC8 COmpiler ? If using XC8 Compiler then include XC.h file. Also include the line #define _XTAL_FREQ 4000000 Try this code. Disable adc by configuring ANSELx ot adcONx registers. Disable Comparator using CMxCOMx or CMCON registers. #include #pragma config OSC=INTIO2 #pragma config
are you using the MLA example C:\microchip_solutions_v2013-06-15\USB\Device - HID - Custom Demos\Firmware\USB Device - HID - Simple Custom Demo - c18 - PICDEM FSUSB.mcp if so the adc is used in the ReadPOT() function by changing adcON0 you may have caused the adc conversion to hang and hence the USB may also hang
I've moved your post to the correct section of Edaboard. The reason it only runs once is that at the end of main() the program terminates, in your case it probably crashes or tries to run random instructions beyond the end of the program. To make it repeat you need to put it in a loop. There are several methods: while(1) {put the code here}
hello, Give more details.. what is your full scale of milliamp for 5V on RA3 adc input ? with adc 10 bits => you will get 1024 pts for the full scale... How do you display the result ? UART -> RS232 -> terminal or on LCD 2x16 car or ?
The "AC Watt Meter" project paper is assuming that you know how to read 10 Bit adc values and thus doesn't discuss the details. But it's not done correctly in your code. I'm not using c18 and don't know how ADRES is generated. Presuming it is a correctly right adjusted 10-Bit values, it surely can't be stored in a char array. Verify that you ge
hello, My question is, i will get direct one decimal number or i need to convert 10 bit hex code into one decimal number?? Inside every MCU , value are always in binary mode .. 0 or 1 so when you get the result of adc You get a binary value...from the 2 register of 8 bits ... and combine them into a register of 16 bits but o
hello, :-xPost #1 this soluce is impossible ! delta +VRef and -Vref must be > 1,5Volt :smile:You can try MCP 3424 or 3421 adc delta sigma converter up to 18 bits i did a lot of test on it .. i get 2?V / point with 17 bits of resolution ( reference =2,048V) see code c18 and results on ea
hello, Minimum range -Vref to +Vref is 1,5V or (2V official) so with 1024 points =>2mV/point What is the speed acquisition nb of measure per second ? if you are not hurry, you can use external high resolution adc like : more details and source c18 on my web page.
/********************************************************************* * * Microchip USB c18 Firmware Version 1.2 * ********************************************************************* * FileName: user.c * Dependencies: See INCLUDES section below * Processor: PIc18 * Compiler: c18 3.11+ (...)
Dear all, I use Microchip c18 and have connected a 8 channel adc LTc1859 to my PIc18F26k22. Reading channel 0 works fine, but when I try to read from channel 1 or 2 or etc..., it always comes back to channel 0 despite sending the correct address for a different channel!!! It also s**** up the gain range... I am (...)
From version 7.7 in the Proteus_inst_dir/SAMPLES folder exists some example project wich contains a .vsmp file. For example see the simple "PIC 12C671 adc" (the complete project folder is attached), or look at the project "c18 Calculator" Here is the "PIC12C671 adc Converter.vsmp":
Hi. I am using PIc18 Explorer board (PIc18F8722), PICKit3 and c18 compiler. I am getting data from the potentiometer of the board, using the adc to obtain analog values and then I want to store these values in the internal EEPROM of the PIc18. I am storing the 10 bit result obtained from the (...)
Hi! I've tried to convert analog voltage to digital voltage with PIc18F46J50 with c18 compiler, but I don't understand how the Openadc() function work, especially what is the last part of the function that ,according to the user guide, you need to enter a value from 0 to 127 or something like that and it's called portconfig. Please I (...)
I am using the c18 compiler for the PIc18F microcontroller I want to write a C code for the adc module. According to the datasheet, the CHS<4.0> in adcON0 is the analog channel select bits. I do not want to assign the CHS4, CHS3, CHS2, CHS1, CHS0 bit by bit. How can I assign the CHS something like: (...)
I'll get to that in a while, but why not use the internal adc?
Hi, I assume you are using c18 from Microchip, if you are then using adc is a lot easier than you think. if you look at page number 18 of MPLAB-c18-Libraries_51297f.pdf located in MCc18\doc you will see how easy it is. here is the example from the file: 2.2.2 Example Use of the A/D Converter Routines #include (...)
ok, so you have a working lcd, and a adc value (properly scaled at 'float conversion') you need a 'float' to 'ascii' convertion... mmm... it's kinda difficult you know? maybe using the 'printf' or 'sprintf' from c18... mmm... should check that... checking... too bad! it doesn't implement "%f"... maybe converting from float to int... if you ne
Hello I have a confusion on the displaying of temperature value less than - 20.4 deg C. Before i begin, here is my hardware/software setup PIc18F4423 @ 20MHz ceramic using 12bit adc Vref++ == VDD == 5V thermistor: MCP9701A compiler c18 Now my problem is explained as follows... Im using the following code in my program to (...)
Hello My project is working partially. I have designed a temperature display on LCD project that involves the following components... PIc18F4423 ceramic 20Mhz c18 compiler Thermistor: MCP9701A LCD: 16X2 Im using full 12bit adc and +Vref == VDD and -Vref == VSS. Im displaying both the adc value and the (...)
Hello Im using PIc18F4220, 20MHz ceramic, c18 compiler. I have a running project where im taking temperature readings after every 300ms intervals and display on 16x2 LCD. Im using thermistor MCP9701A. I have 8bit adc enabled on my PIC and im only reading the high byte ADRESH. My V+ref == Vdd and V-ref == Vss. All seems to (...)
Hi all I am using PICDEMFSUSB example in MCHPUSB - generic driver demo folder of MCHPFSUSB framework v2.5a. I am using pic18F4550 for non-microchip board not fo PICDEMFSUSB board. I want to use pic18F4550 as a data acquisition card. 1) After the adc has performed conversion and the data is in ADRESL:ADRESH , now HOW TO SEND that (...)
Hi all! This is my first topic because i'm new in PIC programming. I have C langage knowledge and i want to handle a new device which is a PIC. I've done the hardware programmer Schaer+ and i use Winpic for programming my code, but it seems that it doesn't work! I've tested my pic with a led blinking and it works. So, i'm sure that my probl
hello, I would be very grateful for help with my adc problem. I am using PIc18F1230 with c18 C compiler. However, the adc is not working. My code is simple just reads the AN0 voltage in a loop, then lights an LED on RB1 if Volts > 1 Volt but turns it off if voltage < 1 Volt. Here is my code... //Program (...)
adc and DAC are difficult to find on MIcrochip's controllers... I don`t know what about Motorola, Atmel, Texas Instruments or the other companies... U can use an built-in adc from PIC and a R-2R ladder or PWM with a high refresh rate... Or a external DAC... It´s ur decision... Good look...
Below is my c18 code to set up a PORTA , PORTE and PORTB...the problem is, the input port still in analogue mode...i don't know why, can anyone explain to me? code: #include #include <adc.h> #include #include #include int result,i; void main( void ) { TRISA = 0xcF; TRISB = 0x00;
I'm not experienced with writting code.I"m using the c18 compiler and a PIC 18f452.I used the manual to help me. This code was written to recieve an interrupt every 2 seconds from a 555 timer. When the interrupt is recieved, the readings of two sensors are taken using adc. A wirespeed is also read from another device. These results are then display