Medsimo 1 Posted January 13, 2017 Share Posted January 13, 2017 hello all !! I'd been worked with MSP430G25530 target for Frequency measurment ... I have a code but, when I use the Serial.print (). nothing show up. any helps please ? my code : Freq-Measurment.ino Quote Link to post Share on other sites
Bubele 2 Posted January 13, 2017 Share Posted January 13, 2017 Hello Medsimo, quick viewed into the attached Energia sketch, so far you forgot that Arduino/Energia do not want "int main()", they expect "void loop()" instead. a few more items which are suspect: > /*** Watchdog timer and clock Set-Up ***/ > WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer > BCSCTL1 = CALBC1_8MHZ; // Set range > DCOCTL = CALDCO_8MHZ; // Set DCO step + modulation the MSP-EXP430G2 board is defined and setup running at 16MHz, so if you go and change anything related to that 16Mhz down to 8Mhz, you may get garbage even if you changed main()->loop(). it may send with 4800 baud. your way to disable the WD may also cause problems. below my guesswork #### void setup() { Serial.begin (9600); delay(500); <==== some delay Serial.println("Setup done"); <==== quick check if setup() did finished. } void loop() { <=== you need "void loop()" instead of "int main()" /*** Watchdog timer and clock Set-Up ***/ //WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer <=== SUSPECT! So commented out. BCSCTL1 = CALBC1_8MHZ; // Set range <==== this and the one below, may cause 4800 baud!!! DCOCTL = CALDCO_8MHZ; // Set DCO step + modulation ### this should at least show you something on your terminal ~ 4800. best regards Peter ;-) Quote Link to post Share on other sites
Medsimo 1 Posted January 16, 2017 Author Share Posted January 16, 2017 I started with this simple example (look below), and it does not show anything in the serial port either. Quote Link to post Share on other sites
Bubele 2 Posted January 17, 2017 Share Posted January 17, 2017 Hello Medsimo, i would reduce it even more, remove all except Serial.begin() and Serial.println() in loop(), do some sort of int i;delay(500); Serial.println(i++); then figure out that is going wrong with your com ports. double-check the EXP-430G2 user manual, i mean the jumper settings for TX/RX! i am not a windows user (a hater), so may not able to help much on windows.however, i saw com port numbers changing similar to linux after flashing the EXP-MSP430G2.so flash a reduced sketch, close energia, open energia, select com port and try again with serial monitor or a terminal program. best regards Peter ;-) Quote Link to post Share on other sites
Medsimo 1 Posted January 31, 2017 Author Share Posted January 31, 2017 thank you Peter I've been checking your code in my device and ... I can not get anything in the serial monitor. Quote Link to post Share on other sites
NurseBob 111 Posted January 31, 2017 Share Posted January 31, 2017 If your launchpad is rev 1.5, based on the photo you posted your jumpers for TX RX may not be correct. Take a look at the Energia reference here. Bob Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.