Jump to content

Salibensuleiman

Members
  • Content Count

    8
  • Joined

  • Last visited

  • Days Won

    1

Salibensuleiman last won the day on July 18 2018

Salibensuleiman had the most liked content!

About Salibensuleiman

  • Rank
    Noob Class
  1. Salibensuleiman

    MSP430FR6989: Serial port monitor is not working

    I think the issue is resolved now, so the first thing is to update MSP430 core as you mentioned before. The 2nd thing is I put pack the jumpers TXD and RXD in their original orientation as when I bought the board first time. Thank you so much for your help.
  2. Salibensuleiman

    MSP430FR6989: Serial port monitor is not working

    Also does the eZ-FET REV 1.2 that is written on the board has any effect?
  3. Salibensuleiman

    MSP430FR6989: Serial port monitor is not working

    I just verify it I'm using COM16 and the baudrate is 9600 in both Serial.begin(....) and in the monitor. I tried the example but nothing shows up in the monitor. Does the USB version in the laptop has any effect? please check the attached file, if so how to know my USB version? and does the existence of CCS has any effect as well.
  4. Salibensuleiman

    MSP430FR6989: Serial port monitor is not working

    Thanks for the reply, I'm still have the same issue, I attached the photos of the Energia version and the the port names, I tried different ports but no success. My main issue now is the serial print
  5. Salibensuleiman

    MSP430FR6989: Serial port monitor is not working

    Thanks for the reply, I'm still have the same issue, I attached the photos of the Energia version and the the port names, I tried different ports but no success. My main issue now is the serial print
  6. Salibensuleiman

    code stuck at the end of setup

    Hi, I am wondering why when I make the debug using CCS, the code at the end of the setup opens a new window with following code and stuck there, I do not have any serial function, I tried to send the data to the serial monitor but it fails so I created a new project without any serial monitor statements/function. #include <Energia.h> int main(void) { init(); setup(); for (;;) { loop(); if (serialEventRun) serialEventRun(); } return 0; } Any help would be appreciated. Thanks
  7. Salibensuleiman

    MSP430FR6989: Serial port monitor is not working

    Thanks for the replies, yes it is a lot of calculations, I posted the whole code because I thought it might help but the issue is : I want to display two voltages, one of them I read it through analogRead function "y22" and the other I calculated it inside the code "IN22" , in serial monitor but I found the serial monitor is empty. I tried this small code from Energia examples but nothing shows up, I just changed the pin A3 to A8 void setup() { Serial.begin(9600); // msp430g2231 must use 4800 } void loop() { int sensorValue = analogRead(A8); Serial.println(sensorValue); delay(1); // delay in between reads for stability }
  8. Dear all, I have the following code , I want to display the value of the variable y22 but nothing shows up in the serial monitor (com16), I tried to dispaly it in LCD but nothing shows up as well, I'm using Energia 1.6, the folder under C and I reorient the jumpers TXD and RXD. I want also to display the value of IN22 inside analogWrite(35,IN22). Could you please verify that for me. Thank you. #include <LCD_Launchpad.h> #include <driverlib.h> #include <SPI.h> #include <LiquidCrystal.h> #include <driverlib.h> // Required for the LCD //#include <LiquidCrystal_I2C.h> //LiquidCrystal lcd; void setup() { // put your setup code here, to run once: //analogFrequency(10000); Serial.begin(9600); SPI.begin(); } float y11=0.0; float y12=0.0; float y13=0.0; float y21=0.0; float y22=0.0; float y23=0.0; float y31=0.0; float y32=0.0; float y33=0.0; float Ub11,Ub12,Ub13,Ub21,Ub22,Ub23,Ub31,Ub32,Ub33; float IN11,IN12,IN13,IN21,IN22,IN23,IN31,IN32,IN33; float y11New,y12New,y13New,y21New,y22New,y23New,y31New,y32New,y33New; void loop() { // put your main code here, to run repeatedly: // //Diagonal input // float U11=1; float U12=-1; float U13=1; // float U21=-1; float U22=1; float U23=-1; // float U31=1; float U32=-1; float U33=1; //Cross input float U11=-1.0; float U12=1.0; float U13=-1.0; float U21=1.0; float U22=1.0; float U23=1.0; float U31=-1.0; float U32=1.0; float U33=-1.0; //Templates A and b //A: float A11=0.045404; float A12=0.046816; float A13=0.046482; float A21=0.046741; float A22=4.0472; float A23=0.046741; float A31=0.046482; float A32=0.046816; float A33=0.045404; //b float b11=0.063908; float b12=-0.061448; float b13=0.079005; float b21=-0.061448; float b22=0.052166; float b23=-0.061448; float b31=0.079005; float b32=-0.061448; float b33=0.063908; //I float I=0.047155; // float y11 = analogRead(A0); // float y12 = analogRead(A1); // float y13 = analogRead(A2); // float y21 = analogRead(A3); // float y22 = analogRead(A0.7); // float y23 = analogRead(A5); // float y31 = analogRead(A6); // float y32 = analogRead(A7); // float y33 = analogRead(A8); int counter=0; if ( counter==0) { y22New=y11*A11+y12*A12+y13*A13+y21*A21+y22*A22+y23*A23+y31*A31+y32*A32+y33*A33; Ub22=U11*b11+U12*b12+U13*b13+U21*b21+U22*b22+U23*b23+U31*b31+U32*b32+U33*b33; y11New=y11*A11+y12*A12+y21*A21+y22*A22; Ub11=U11*b11+U12*b12+U21*b21+U22*b22; y12New=y11*A11+y12*A12+y13*A13+y21*A21+y22*A22+y23*A23; Ub12=U11*b11+U12*b12+U13*b13+U21*b21+U22*b22+U23*b23; y13New=y12*A12+y13*A13+y22*A22+y23*A23; Ub13=U12*b12+U13*b13+U22*b22+U23*b23; y21New=y11*A11+y12*A12+y21*A21+y22*A22; Ub21=U11*b11+U12*b12+U21*b21+U22*b22; y23New=y12*A12+y13*A13+y22*A22+y23*A23+y32*A32+y33*A33; Ub23=U12*b12+U13*b13+U22*b22+U23*b23+U32*b32+U33*b33; y31New=y21*A21+y22*A22+y31*A31+y32*A32; Ub31=U21*b21+U22*b22+U31*b31+U32*b32; y32New=y21*A21+y22*A22+y23*A23+y31*A31+y32*A32+y33*A33; Ub32=U21*b21+U22*b22+U23*b23+U31*b31+U32*b32+U33*b33; y33New=y22*A22+y23*A23+y32*A32+y33*A33; Ub33=U22*b22+U23*b23+U32*b32+U33*b33; IN11=y11New+Ub11; IN12=y12New+Ub12; IN13=y13New+Ub13; IN21=y21New+Ub21; IN22=y22New+Ub22; analogWrite(35,IN22);//pin 2.2 IN23=y23New+Ub23; IN31=y31New+Ub31; IN32=y32New+Ub32; IN33=y33New+Ub33; y11=0.7*tanh(2.0*IN11); y12=0.7*tanh(2.0*IN12); y13=0.7*tanh(2.0*IN13); y21=0.7*tanh(2.0*IN21); y22=analogRead(A8);//0.7*tanh(2*IN22)+I; pin 9.0 delay(500); y23=0.7*tanh(2.0*IN23); y31=0.7*tanh(2.0*IN31); y32=0.7*tanh(2.0*IN32); y33=0.7*tanh(2.0*IN33); counter=1; } else{ y22New=y11*A11+y12*A12+y13*A13+y21*A21+y22*A22+y23*A23+y31*A31+y32*A32+y33*A33; Ub22=U11*b11+U12*b12+U13*b13+U21*b21+U22*b22+U23*b23+U31*b31+U32*b32+U33*b33; y11New=y11*A11+y12*A12+y21*A21+y22*A22; Ub11=U11*b11+U12*b12+U21*b21+U22*b22; y12New=y11*A11+y12*A12+y13*A13+y21*A21+y22*A22+y23*A23; Ub12=U11*b11+U12*b12+U13*b13+U21*b21+U22*b22+U23*b23; y13New=y12*A12+y13*A13+y22*A22+y23*A23; Ub13=U12*b12+U13*b13+U22*b22+U23*b23; y21New=y11*A11+y12*A12+y21*A21+y22*A22; Ub21=U11*b11+U12*b12+U21*b21+U22*b22; y23New=y12*A12+y13*A13+y22*A22+y23*A23+y32*A32+y33*A33; Ub23=U12*b12+U13*b13+U22*b22+U23*b23+U32*b32+U33*b33; y31New=y21*A21+y22*A22+y31*A31+y32*A32; Ub31=U21*b21+U22*b22+U31*b31+U32*b32; y32New=y21*A21+y22*A22+y23*A23+y31*A31+y32*A32+y33*A33; Ub32=U21*b21+U22*b22+U23*b23+U31*b31+U32*b32+U33*b33; y33New=y22*A22+y23*A23+y32*A32+y33*A33; Ub33=U22*b22+U23*b23+U32*b32+U33*b33; IN11=y11New+Ub11; IN12=y12New+Ub12; IN13=y13New+Ub13; IN21=y21New+Ub21; IN22=y22New+Ub22; analogWrite(35,IN22);//p.n 2.2 IN23=y23New+Ub23; IN31=y31New+Ub31; IN32=y32New+Ub32; IN33=y33New+Ub33; y11=0.7*tanh(2.0*IN11); y12=0.7*tanh(2.0*IN12); y13=0.7*tanh(2.0*IN13); y21=0.7*tanh(2.0*IN21); y22=analogRead(A8);//0.7*tanh(2*IN22)+I; pin9.0 float voltage =Serial.println(y22*3.0/1023.0); y23=0.7*tanh(2.0*IN23); y31=0.7*tanh(2.0*IN31); y32=0.7*tanh(2.0*IN32); y33=0.7*tanh(2.0*IN33); } }
×