Search the Community
Showing results for tags 'voltage'.
-
I have made this code with my group now we want to edit it and make the code read voltage of a battery but we're not sure how to edit it because the professor want it in the same form as below and by the simple C Please don't forget to put comments so I would know what you actually changed float ThresholdExceeded = 0; char x[] = " out of 3.3v \n"; volatile unsigned int i=2001; void setup() { ADC12CTL0 = ADC12SHT02 + ADC12ON; // Sampling time, ADC12 on ADC12CTL1 = ADC12SHP; // Use sampling timer ADC12IE = 0x01; /
-
Hello i have seen article about reading the supply voltage from MSP430 http://www.elevendroids.com/2013/06/code-recipe-reading-msp430-power-supply-voltage-level/ It can be usefull when running on batteries however i am not able to find anything suitable to use for TM4C123. The system DEFINES carries another names and the code can not be used. I have only used Energia for programming my LM4F120. If anyone have some experience in reading the internall VCC a and Voltage Reference to compute supply voltage level on TM4C123 I would be thankfull.
-
Hi! Just a few questions: What is the default reference voltage for the analogRead() function on a msp430 g2553 ? Is it the internal Vcc ? How can I read the exact reference voltage correctly? Is there an option to change the reference voltage? Thanks in advance! kind regards, s1ck
-
Hi, I'm getting to grips with a Launchpad ek-tmc123gxl board, and so far it looks amazing. However I have hit a snag which is pretty painful. Consider the following code: #include <stdbool.h> #include <stdint.h> #include "inc/hw_gpio.h" #include "inc/hw_memmap.h" #include "inc/hw_sysctl.h" #include "inc/hw_types.h" #include "driverlib/gpio.h" #include "driverlib/pin_map.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/sysctl.h" void setup(void); #define delay(x) SysCtlDelay((SysCtlClockGet() / 3000000) * x) uint8_t sequence_1[16] = { 0x4
- 5 replies
-
- tiva
- tm4c123gh6pm
-
(and 3 more)
Tagged with:
-
Hello, I have an LCD working, and I also have an adc working to get voltage from a potentiometer. I am able to display adc values on the LCD, and they change when I change the value of the pot. But I am stuck with one thing, I know that it is a 10bit adc, which means it can only get 0x3FF different values of data. I have a DMM connected to the voltage from the pot, that same voltage is going to the adc on the msp340. Here are some of the values that I got: 5V--------->0x0000 4.5V------->0x009D 4V---------->0x0126 3.5V-------->0x01BD 3V---------->0x0249 2.5V--------&