Differenze tra le versioni di "SerialViewGLCD"
Jump to navigation
Jump to search
(Creata pagina con '<div style="float:right;border:1px solid black;padding:10px;margin:10px background:#F5F6CE; border:1px solid #a7d7f9; vertical-align:top; color:#000; padding: 5px 10px 10px 8p...') |
|||
Riga 116: | Riga 116: | ||
== Riferimenti == | == Riferimenti == | ||
+ | *http://playground.arduino.cc/Code/GLCDks0108 | ||
*https://bitbucket.org/bperrybap/openglcd/wiki/Home | *https://bitbucket.org/bperrybap/openglcd/wiki/Home |
Versione delle 18:11, 1 gen 2017
200px |
---|
Graphic LCD w/ ATMEGA328 |
Visualizzatore porta seriale con LCD Grafico comandato da ATMEGA328 |
Repository: non ancora |
GLCD w/ ATMEGA328
- ATTENZIONE
- Le immagini, se presenti, sono puramente indicative.
- Fra i simboli di redirezione "<" e ">", sono inseriti i nomi fittizi da sostituire con reali (per esempio: <nomefile.txt>)
- Fra parentesi quadre "[]" sono indicati comandi opzionali.
Descrizione
Visualizzatore porta seriale con LCD Grafico comandato da ATMEGA328
Collegandogli una porta seriale, ne visualizza la trasmissione.
Utile quando impossibilitati a spostare il computer dove necessario (o sprovvisti del secondo pc) per "debuggare" un programma. Per esempio quando si deve provare un'antenna RF, trasmittente e ricevente.
Hardware
I codici articolo sono (spero) tutti riportati nel circuito elettrico: File:Atmega328-glcd.pdf
Software
Ho usato pari pari, l'esempio fornito con la libreria (Serial2GLCD)
/*
* openGLCD Library - Serial Input displayed on glcd
*
* This sketch displays text characters sent over the serial port
* (e.g. from the Serial Monitor) on an attached GLCD.
* Lines will wrap and scroll the text when needed.
* When a new line character is received new text is wrapped to the next line.
*
* If you use the Arduino IDE Serial Monitor and want lines to wrap
* when you press <enter> or click on the [Send] button, you must
* turn on the NewLine option down by the BaudRate setting.
*
*
* 2013.06.15 bperrybap - conversion to openGLCD
* 2011.12.04 bperrybap - original creation
* bperrybap@opensource.billsworld.billandterrie.com
*/
// include the library header
// no font headers have to be included
#include <openGLCD.h>
void setup() {
// Initialize the GLCD
GLCD.Init();
// Select the font for the default text area
GLCD.SelectFont(System5x7);
GLCD.println("Listening..."); // output using Print class
// could also use gText string output routine
// GLCD.Puts("Listening...\n");
Serial.begin(9600);
}
void loop()
{
char c;
// when characters arrive over the serial port...
if (Serial.available())
{
// read character from serial library buffer
c = Serial.read();
// display character on glcd
GLCD.write(c); // use Print class for output
// could also use gText character output routine
// GLCD.PutChar(c);
}
}
Utilizzo
Collegare alimentazione e porta seriale ;)