Search the Community
Showing results for tags 'read'.
-
Hi, I'm new to MSP430, I'm using a MSP430G2553 in a project and need help with an in depth understanding of programming the ADC10 inputs of the MCU. I'm using a potentiometer in order to light one of 3 LEDs. For example, LED1 lights up when input voltage is 1V or less, LED2 lights up between 1V and 2V and LED3 lights up when the input voltage is greater than or equal to 2V. I have attached my code below but I am not clear on how to read, convert and store a voltage so that I can use the IF statements to light the respective LEDs. #include <msp430g2553.h> void indicator_LED
- 1 reply
-
- ADC
- MSP430G2553
-
(and 7 more)
Tagged with:
-
I have an XBee (S2C) connected to my Mac and another XBee connected to a TI microcontroller (TIVA-C129) communicating with each other - Mac as a coordinator and TI as a router. I can communicate between them, but on the TI side, I can't read the exact data that is coming in the serial port. On the Mac, I am running below python code that reads the incoming serial data through XBee and writes an acknowledgment. #!/usr/bin/python import serial ser = serial.Serial('/dev/tty.usbserial-A104IC2U', 9600) ack='A' while True: incoming = ser.readline().strip() if incoming != 'A': print '%s' % inco
-
Hello. im trying to read from the i2c port on my g2231, i have found a i2c libary from this website link but as I see the libary dont support repeated start. I have tried to add this, with some code I found on this forum. im trying to read from a expander ic MCP23016. but the only thing I read is 0xFF ?. im able to write to the expander ic with no problem. its the first time i work with i2c. thanks for looking I have added the full code to. void main(void) { WDTCTL = WDTPW + WDTHOLD; __delay_cycles(500000); i2c_init(); // startup i2c exint(); // init the expander ic lcd
-
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