Desmond 0 Posted February 6, 2015 Share Posted February 6, 2015 The best example of Stellaris as a tool is as a logic analyzer see here.. http://www.sodnpoo.com/posts.xml/variable_sample_rate_stellaris_logic_analyser.xml Currently I am working with the ESP8266 modules and I wanted to see what was being transmitted and received over the serial interface without cluttering my code with debug. Stellaris is perfect. /* Software serial multple serial test Receives from the hardware serial, sends to software serial. Receives from software serial, sends to hardware serial. The circuit: * RX is digital pin P1.4 (connect to TX of other device) * TX is digital pin P1.3 (connect to RX of other device) created back in the mists of time modified 25 May 2012 by Tom Igoe based on Mikal Hart's example modified again 8 Feb 2013 by Brian Baker for MSP430 This example code is in the public domain. Modified as a piece of test equipment */// #include <SoftwareSerial.h>// SoftwareSerial mySerial(P1_4, P1_3); // RX, TXvoid setup() { // Open serial communications and wait for port to open:// #define debugSerial Serial // Using USB serial #define debugSerial Serial5 // Using hardware serial via RS232 to TTL convertor debugSerial.begin(115200); debugSerial.println("Stellaris Serial MUX starting....."); // set the data rate for the monitored ports Serial1.begin(9600); Serial2.begin(9600); Serial3.begin(9600);}void loop() // run over and over{ while (Serial1.available()){ debugSerial.write("\x1b[37;1m"); debugSerial.write(Serial1.read()); } while (Serial2.available()){ debugSerial.write("\x1b[34;1m"); debugSerial.write(Serial2.read()); } while (Serial3.available()){ debugSerial.write("\x1b[33;1m"); debugSerial.write(Serial3.read()); } while (debugSerial.available()) Serial1.write(debugSerial.read());} Automate and L.R.A 2 Quote Link to post Share on other sites
L.R.A 78 Posted February 7, 2015 Share Posted February 7, 2015 Pretty cool!I want to do something similar but I didn't understand what values to send to the logic analyzer software! 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.