Post Reply 
Intel Edison generic calculator shield photo journal
04-09-2015, 02:28 PM
Post: #51
RE: Intel Edison generic calculator shield photo journal
Greetings, I have the analog keyboard running well on the Edison with some minor mods to the keyboard design to make the keyboard hardware more reliable, and to make the interrupt routine simpler (taking Matthias' comments to heart, it worked well). You can see the Fritzing of the bread-board on the Generic blog|forum.
Here I am going to high-light what's going on with the Edison; gpio is solid, and now the reads from the ADC (analog) block via i2c are working flawlessly. The big change to the keyboard design was the addition of a 555 one-shot timer circuit, to smooth out the contact bounce on the interrupt line which also vastly simplifies the interrupt handler; I've attached the new codes below which have all the i2c stuff in place. keep in mind the codes are just proof of concept and not intended to represent anything finished.

[Image: edison-analog-keyboard2.jpg] [Image: edison-analog-screen2.jpg]

I moved the setup() routine to the main blinker.c file. Most of what is interesting from an i2c standpoint is there... the rest is in the interrupt handler.
The i2c part of the MRAA library is a mess... no disparagement, just fact. Most of the API is still missing... the routines mraa_i2c_read_word_data() and others similar. You have to write to the register (like 0) before you can read from it... the mraa_i2c_read() reads from the LAST register written to... uhg. The endianess of i2c is confusing (and its backwards from the command line tools). Needless to say, it took a while to get what I thought I understood about i2c to actually work on the Edison ADC in C... but, yesssss, its now working (and it works very well, thank you).

All four keyboard analog lines share the same LM339 chip (four comparators one for each line) and the comparators are wired OR to pin 2 of the 555 timer one-shot. The 555 produces a very nice clean sharp hysteresis for the Edison's interrupt system... the rising edge works very well... and the keyboard is flawless... even with wires laying loose all over the desk, as you can see.

I thought I would have the Due actually calculating first, but clearly the Edison is going to win out there, for sure. The first pcb design is under way, and as always I have parts on order.

Cheers,
marcus
Smile


Attached File(s)
.tar  blinker7.tar (Size: 25.5 KB / Downloads: 5)

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Intel Edison generic calculator shield photo journal - MarkHaysHarris777 - 04-09-2015 02:28 PM



User(s) browsing this thread: 1 Guest(s)