<\/o:p><\/span><\/p>\nPer implementare altri comandi di deve modificare la funzione <\/o:p><\/p>\nunsigned char interrupt ricezione(void)<\/strong>, in particolare intervenendo nel blocco switch, inserendo altri case, riferiti ai comandi da implementare:<\/o:p><\/p>\n<\/o:p><\/span><\/p>\n\n
<\/o:p><\/span><\/p>\n<\/p>\n...
\n c = GetCommand();
\n if (!c) {
\n switch (read_Buff(2)) {
\n case 5:
\n...
\n<\/code>
\nEsempio di utilizzo<\/strong><\/div>\necco ora una parte del codice di un progetto che utilizza il modulo:<\/p>\n
c = ReadKey();
\n switch (c) {
\n case 0x0a:
\n sendCommand (0x35, 6, 0);
\n break;
\n case 0x1a:
\n sendCommand (0x35, 7, 0);
\n break;
\n case 0x0b:
\n DelayMs (200);
\n sendCommand (0x35, 8, 0);<\/p>\n if (getCommand()==0)
\n sendSlave();
\n break;
\n default:
\n DelayMs (200);
\n c += 0x30;
\n sendCommand (0x35, 5, c);
\n }
\n<\/code><\/p>\n
<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"
Nella progettazione e realizzazione dei progetti adotto da tempo la tecnica \u201cmodulare\u201d che consiste nella realizzazione di periferiche con interfacciamento standard (seriale nel caso specifico). Vediamo qui la scheda del modulo display a 7 segmenti.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"categories":[5],"tags":[31,32,23,35,34,33,24,25,19],"_links":{"self":[{"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/posts\/139"}],"collection":[{"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":0,"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ognigiorno.com\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}