Jump to content
43oh

muzay

Members
  • Content Count

    24
  • Joined

  • Last visited

About muzay

  • Rank
    Member

Contact Methods

  • Website URL
    http://www.bme.boun.edu.tr

Profile Information

  • Gender
    Male
  • Location
    Turkey
  1. hi there, i'm trying to measure impedance by applying sinusoidal wave to a chemical gel. it cannot operate by dc voltages. i can achieve to measure resistance from a dc circuit and send the solution to an LCD screen by reading two channels as follows: my code: #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); lcd.print("impedance :"); } void loop() { int sensorValue1 = analogRead(A0); int sensorValue2=analogRead(A1); // Convert the analog reading (which goe
  2. For faster reading my new code will be as follows; the output will be binary or the hexadecimal by ANDing 0xFF? edit: just realized it! since i have 10 bits ADC, i have to send the data as 2 bytes as High and Low part. I only use last 2 bits of HSB and all LSB on the computer side... -------------------------------- const int analogInPin = A0; // Analog input pin ECG signal attached (150 Hz, 0-2Volts) int sensorValue = 0; void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); } void loop() { sensorValue = analogRead(analogInPin); Serial.write(sensorV
  3. I'm too excited to try this B@tto, thanks a lot... I'll report the results then...
  4. Thanks dbunet and B@tto, What if i read the data just on bluetooth module, not over usb? can i achieve 115200 this time? does g2553 support this speed then? i'll try to change the BT module's (HC 06) baud rate which is 9600 as default....
  5. Thank you all for your stimulating responses... You are right, the serial process and conversion of the data to the integer values makes this slow down. I think i cannot write the appropriate code to store the data and send it to the serial channel (UART) to make it faster. I may choose a ti kit which can use faster baudrate,like launchpad c2000 piccolo (115200 etc.) By the same code, i can achieve 115200 / 10 cycle / 30 byte which makes nearly 380 Hz sampling. Am i right with this calculation? - The other issue, Unfortunatelly, all my data is significant, its ECG signal fr
  6. I'm just using sample code that comes with the energia library...I'm monitoring my code on comport and also over Bluetotooth... I can sample all dc values over a potentiometer, but when it comes to a ac signal (which is offsetted to be read by ADC).. I really need to find out the way i select my sampling frequency at 1 kHz. code: --------------------------------------------- const int analogInPin = A0; // my signal attached here (0-2 Volts, 150 Hz) const int analogOutPin = 9; // Analog output pin that the LED.......no meaning for me to do this int sensorValue = 0; // value re
  7. hi all, i'm using lauchpad v1.5 G2553 chip on it. I'm reading an anolog signal (150 Hz, 0-1.5Volts). The default sampling frequency for example potentiometer reading codes seems too slow. How can i set the sampling frequency to 1kHz using Energia (0101E0012 version) ? Any sample code would be appreciated thanks...
  8. Thank you a lot RobG! it worked pretty well... Here is my code who needs to see.... #include <msp430g2553.h> // System define for the micro that I am using #define RXD BIT1 // Check your launchpad rev to make sure this is the case. Set jumpers to hardware uart. #define TXD BIT2 // TXD with respect to what your sending to the computer. Sent data will appear on this line #define BUTTON BIT3 unsigned int adcValues[2] = {0,0}; // ADC buffer void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop Watch dog timer BCSCTL1 = CALBC1_16MHZ; DCOCTL = CALDCO
  9. i tried to activate ADC for p1.4 and p1.5 succesively, but it gave me only zeros.. , i really need suggestions... thanks..
  10. hi everyone, i'm sampling from single channel ADC and send the data over UART. now i need to two channel simultaneously and send the data. for one channel my code is below: ----------------------------------------------- ADC10CTL1 = INCH_5 + ADC10DIV_3 ; // Channel 5, ADC10CLK/4 ADC10CTL0 = SREF_0 + ADC10SHT_3 + ADC10ON + ADC10IE; //Vcc & Vss as reference ADC10AE0 |= BIT5; ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start, single measure! while(1) { if(!((P1IN & BUTTON)==BUTTON)) { ADC10CTL0 |= ENC +
  11. @@RobG, i could somehow achieve to sample my data and send it over uart via bluetooth module. Thank you all helping me. I realized that with launchpad 2553 i cannot achieve more than 9600 baudrate! When i want to use 38400 baudrate, should i change my launchpad? is it really not possible to speed it up?
  12. Thanks @@RobG, it worked pretty well for now, ill try if it is able to sample my data!
  13. Im using a blueetooth module, not a cable actually. I realized that i have button debounce delay, i made it only 10 cycle, but it gave me only 10 data per second. So the part that im trying to contert integer value of ADC to char is slow for me, i sould try the other version, integer to ASCII ones..and I should change the baudrate of my code and also baudrate of B/T module (no idea how to do). lets try if i can impelement it into my code, lol.. thank you
  14. I even could not have 150 samples. By increasing the baudrate, i could have enough sample over uart, right?
  15. I have found my real trouble! ok, i summarize what i did before. Im sampling an anaolog data (data includes 0.1-200 Hz and -1 to 1 volts) using DAC. I used offset circuit to be able to read negative values. While testing the MSP430G2553, It works fine for different DC voltage samplings but when i used AC (sinusoidal) signal, i realized that the code gives me 8-9 data per second! whereas i need at least 500 or more data! my conversion is too slow! :-( Beein a poor coder, i need a real help, i'm in trouble...upss
×
×
  • Create New...