Post Reply 
Intel Edison generic calculator shield photo journal
03-25-2015, 03:41 AM
Post: #21
RE: Intel Edison generic calculator shield photo journal
(03-25-2015 02:57 AM)BarryMead Wrote:  Mark: Matthias wasn't trying to discourage you from using the Intel Edison . . . I agree that having more power gives you greater capability to grow the feature set of the device, but with growth in features comes growth in software development and if the calculator were to do all of the things you described including interfacing with spreadsheets, printers, plotters, other collaborating scientists or students, etc, this would require a whole team of software developers and the budget of a large corporation to pull it off.

hi Barry, thanks for the feedback... I should mention I hate feature creep. To prevent it requires design goals that 'include' the dream-set. My last project at IBM automated call-flow through our support center... that is, my part was a beo-cluster that automated how disparate servers interacted in a synchronized and prioritized way, to get the person's 'next call' from the phone switch, against the call database, synchronized with my beo-cluster to their desktop PC, so that the phone would ring with their customer on one end, and the call record in front of them. I built the whole thing using gnu/linux and off-the-shelf parts (some from our recycle center) and I wrote all of the software myself... in three months. I needed six, but was told if I wanted the job (or a job) they needed it in three. Why am I telling you this? When I decide to build something it gets built. When I write code it runs. When I set my mind to something I don't need any corporate anything to make it happen... just determination, imagination, will power, creative energy, and time; and not much time, no brag, just fact.

If you read Matthias' posts they have a common theme... it won't or shouldn't work, don't bother. Go look for yourself. But on a positive side, sometimes that's just posturing and|or fear. Since no one is building the products we want, and they discontinue the products we have, its time to make them irrelevant and build the stuff we desire ourselves. Its the next wave, and we can all choose to ride it or not. I'm waxing the board, baby!

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-25-2015, 05:45 AM (This post was last modified: 03-25-2015 05:48 AM by MarkHaysHarris777.)
Post: #22
RE: Intel Edison generic calculator shield photo journal
(03-23-2015 08:29 PM)matthiaspaul Wrote:  The Edison provides a compound processor with three cores, two Atoms running at 500 MHz and one Quark running at 100 MHz. One of them would be enough to accomplish the task. Also, we don't need 1 GB DRAM in a calculator. 32 MB would be more than enough.

I almost agree with this... and the idea is behind my thought that a generic calculator can run anywhere, including an Arduino Uno. All we have to do is decide what to do with the memory that is given to us...

... and more is better. A lot more is way better. Huge amounts is really nice. ;-)

Well, to quote William R. Gates, "Nobody will ever need more that 640k". His statement was based primarily in a complete lack of education, and somewhat on a complete lack of vision. But, at the time, anyone could clearly see the power of the raw processor running its native codes and even at the blinding speed of 10 Mhz (some machines then were running a 4.5) machine code was imperative. Machine code in the AVR environment is just as impressive; and much can be packed into a small space, if you're a real programmer!

Back in the day (and not too distant past) calculators were what calculators were, because we couldn't pack a real computer on-board. Things have changed.

My Intel Edison is laying out open, exposed, unprotected on my desktop with a 300 mA wallwart attached to it, and it attached via wifi to the Internet. It is motionlessly and silently (say powerfully) present on the net with no moving parts, no heat, no large power drains, very little (almost no) cost, just looking for a case to hide in... and I'm going to print that case on my 3D printer... and wrap the entire thing around a calculator... that will be also a great number of other things as well.

But, take a step back, while I'm trying to get you to catch my vision, and tell me what is inside the WP34s? And then, tell me what EVERYONE wanted to add to it... printer, IR, USB... wifi if they could!
... and why? Because calculator paradigm says they are stand-alone appliances that don't need to collaborate, nor communicate. And even the NCEES is passing this on to students by forbidding collaboration (nor any such devices) on exams... when those VERY devices are going to be needed in the engineering field in the 21st century. Its mind blowing.

By the way, the edison takes up even less space when you consider that you won't be using the breakout board (not even the mini one) on a commercial board for this project... the project boards will have their own 70 pin Hirose connector and the edison will be sitting there taking up no more room than a postage stamp.

Do you realize the power in the WP34s? The developers maxed its memory, and tapped is power to the max... and there is MUCH more they would have liked to do... Pauli told me, maybe he'll comment here, but as the primary coder for the WP34s 'he' recommended this board first. I just agree with his opinion and logic.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-25-2015, 07:56 AM
Post: #23
RE: Intel Edison generic calculator shield photo journal
(03-25-2015 03:41 AM)MarkHaysHarris777 Wrote:  When I decide to build something it gets built. When I write code it runs. When I set my mind to something I don't need any corporate anything to make it happen... just determination, imagination, will power, creative energy, and time; and not much time, no brag, just fact.
You are certainly a prolific and enthusiastic inventor/poster on this forum, and I encourage you to keep going. When people share their wisdom with you take the good parts to heart and throw out anything that seems discouraging or negative. Progress even it it isn't in a straight line is still progress. If others want you to go in their direction, then they can help or get out of your way! It is also a good idea to interface with those who have already taken the WP-43S project to the prototype stage, to see what has already been done. Not so that it limits your creativity, but so that you don't have to re-invent everything that has already been invented. One person can do a lot, but a well organized team of talented developers can always do more. I encourage you to keep up the good fight, and to plug into the existing development team as a collaborator. If we want open source calculators to continue into the future we need talent like yours. Thanks, Mark
Find all posts by this user
Quote this message in a reply
03-25-2015, 05:27 PM
Post: #24
RE: Intel Edison generic calculator shield photo journal
Somewhat off topic

(03-25-2015 05:45 AM)MarkHaysHarris777 Wrote:  ...
Well, to quote William R. Gates, "Nobody will ever need more that 640k". His statement was based primarily in a complete lack of education, and somewhat on a complete lack of vision.
...

At least here is some indication, that he didn't say that.

Günter
Find all posts by this user
Quote this message in a reply
03-26-2015, 04:03 AM (This post was last modified: 03-26-2015 04:06 AM by MarkHaysHarris777.)
Post: #25
RE: Intel Edison generic calculator shield photo journal
(03-25-2015 05:27 PM)Guenter Schink Wrote:  
(03-25-2015 05:45 AM)MarkHaysHarris777 Wrote:  ...
Well, to quote William R. Gates, "Nobody will ever need more that 640k". His statement was based primarily in a complete lack of education, and somewhat on a complete lack of vision.
...
At least here is some indication, that he didn't say that.

hi Guenter, good to hear from you... you are correct, this is what he actually said,

"When we set the upper limit of PC-DOS at 640K, we thought nobody would ever need that much memory". — William Gates, chairman of Microsoft

He has been misquoted over and again since the early 1980s when he first said this... I was there, and he can deny it till the proverbial cows come home, but it ain't goin away... sorry.

Read about it some more here.

Back on topic... I was able to solder in my gold header pins into the mini-breakout board tonight without killing the board so that I can get the relevant pinouts from the edison to my protoboard; using 'female' ended jumper wires from the edison case to the general breadboard.

On a side note, this edison board can now print, to all of my network printers, and is multitasking several 'sketches' with very nice performance; its fantastic really.

PS pics are coming when I get the case finished later tonight. I've decided I've been lucky so far leaving this thing laying out naked on the bench... needs some clothing! ;-)

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-26-2015, 04:18 AM (This post was last modified: 03-26-2015 04:21 AM by MarkHaysHarris777.)
Post: #26
RE: Intel Edison generic calculator shield photo journal
(03-23-2015 08:29 PM)matthiaspaul Wrote:  The Edison is a nice little module and is certainly very interesting for many embedded applications. I specifically like the fact that it is x86-compatible. . . .

I have also been considering (and testing) the 'guts' of the Raspberry PI (Broadcom's chipset, and flash) as well a very small form factor (not as small as the edison, I'm afraid) that is similar to a dimm slot memory card. You can read about the Raspberry PI Development board on-line. This board would also make a fabulous calculator (for science platform, printing, serving, and plotting). I need to make some comparisons and also compare and contrast the power requirements and empirical measurements.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-26-2015, 09:43 PM
Post: #27
RE: Intel Edison generic calculator shield photo journal
(03-26-2015 04:18 AM)MarkHaysHarris777 Wrote:  I have also been considering (and testing) the 'guts' of the Raspberry PI (Broadcom's chipset, and flash) as well a very small form factor (not as small as the edison, I'm afraid) that is similar to a dimm slot memory card. You can read about the Raspberry PI Development board on-line. This board would also make a fabulous calculator (for science platform, printing, serving, and plotting). I need to make some comparisons and also compare and contrast the power requirements and empirical measurements.

Cheers,
marcus
Smile

Be careful!
There was a product: the Odroid-W with the Broadcom chip and a much smaller form factor than the Pi:
http://www.hardkernel.com/main/products/...0610189490

After a successful launch, they tried to buy more chips for a second batch and couldn't do it because Broadcom only sells in huge quantities (except to the Raspberry Pi foundation). They were forced to kill their successful product.
So if you use a R Pi compatible board, always remember you can't create your own design based on theirs. You have to buy their board and use it as-is because you just can't get the chip on the market.
On other platforms you might be able to use their open hardware design to create your own compatible board in the form factor that you actually need.
The Edison is ideal in that it's a tiny CPU module, and you can create your board any way you want.
Don't give away your freedom of design.

Claudio
Find all posts by this user
Quote this message in a reply
03-26-2015, 10:51 PM (This post was last modified: 03-28-2015 06:00 AM by MarkHaysHarris777.)
Post: #28
RE: Intel Edison generic calculator shield photo journal
(03-26-2015 09:43 PM)Claudio L. Wrote:  
(03-26-2015 04:18 AM)MarkHaysHarris777 Wrote:  I have also been considering (and testing) the 'guts' of the Raspberry PI (Broadcom's chipset, and flash) as well . . .

Be careful!
There was a product: the Odroid-W with the Broadcom chip and a much smaller form factor than the Pi:
http://www.hardkernel.com/main/products/...0610189490
After a successful launch, they tried to buy more chips for a second batch and couldn't do it because Broadcom only sells in huge quantities (except to the Raspberry Pi foundation). They were forced to kill their successful product . . .

Wow. How did JarJar Binks put it, "Yousah point is well said..."

What a fiasco; good read, thank you. I did notice that they only ship very large lots. Thanks again, Claudio.

marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-26-2015, 11:55 PM (This post was last modified: 03-27-2015 06:38 AM by MarkHaysHarris777.)
Post: #29
RE: Intel Edison generic calculator shield photo journal
Greetings, I've placed my development board in a case (to protect it primarily, and secondarily to speed and ease the prototyping process). My tri-state voltage shifters came in the mails from adafruit today, so I'll be making a compare|contrast with pics. The voltage shifters are going to improve the product considerably, as well reduce the build complexity (not to mention keep most folks out of the woods in terms of these low voltage logic boards like the edison, or the due). Casing the edison mini breakout board was fairly straight-forward but required some modeling skills-- a large amount of plastic needed to be removed from the case; I used scalpels and a high speed dremmel tool. The casing included mounting header pins to the mini breakout board, providing a barrel connector for power, and exposing the LED view-ports and pinout expansion openings. Some hi-res pics, then compare|contrast with the voltage shifters:

[Image: edison-cased_1-2.jpg] [Image: edison-cased_2-2.jpg] [Image: edison-cased_3-2.jpg]

The case measures 7.5cm x 5cm x 2.9cm. It basically has two tops, or two bottoms depending on your perspective. During testing as a server and software development board it sits on the bench pins down (lights up). When being used as a hardware development board it sits pins up to expose the expansion breakouts slot. I chose to NOT solder a barrel connector to the breakout board itself. Intel provides for this, but I chose to put the barrel connector in the case housing, running the power line internally to the two pin jumper J21. Now for the shifter compare|contrast, and some more hi-res pics:

[Image: edison-cased_4-2.jpg] [Image: edison-cased_5-2.jpg] [Image: edison-cased_6-2.jpg]

The obvious difference here is the lack of reference resistors, and also a lack of pullup resistors, in the second pic. The second pic highlights the 8 channel tri-state voltage shifter from adafruit which Barry M recommended to me a couple of weeks ago. It not only provides tri-state logic (the 339 does not) but it also works across a wide range of voltages. All that is needed to 'program' the chip is to provide both the VccA and VccB reference voltages (from the source) in this case 1v8 from the edison, and 5v0 from my display system. The voltage shifter also comes with an output enable OE line, normally held HIGH. This line is beauty. Under program control if the line is pulled low then the 'port' is effectively closed... that is the shifter is quiesced (disabled), and the outputs are pulled low (plus, the shifter goes into a very low power saving mode). The production board may use the small surface mounted chip... or I may use the 74LVC245 (tri-state, works the same way) 20 pin standard package. The shifter from adafruit is nice for bread boarding, but they are pricey (almost nine bucks $9 US) I was impressed that header pins shipped with the board. There is no reason, however, if a person wanted to put the adafruit shifter in their project; it has a tiny form factor and is easy to solder to.

At this point, in my opinion, the edison is the board to beat... there are some issues with the RPi board, but I'm still looking at it. Its going to be very hard to beat the edison board for perks across the board, so to speak.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-27-2015, 06:49 AM
Post: #30
RE: Intel Edison generic calculator shield photo journal
Greetings, see the updated pics in the previous post... specifically the third pic in the second set of three.

The binary-calculator runs in the edison (as in the Due) almost without change. The pinouts map over, but apparently, the edison does not support programmable pullup resistors on its input lines... so although this command did not fail (the AVR compiler did not even give a warning):

pinMode(5, INPUT_PULLUP);

... the pullup resistor has to added in the physical hardware (you can see this in the third pic above, second set of three).

On a very positive note, (those of you who have ever struggled with updating the firmware of the WP34s, or built a flash cable, or maybe a WP34s Flash Station this is important!) the edison 'sketch image' (the calculator firmware) can be uploaded over wifi with scp (secure copy component of ssh) followed by a reboot.
This can even be done within the Arduino IDE (and of course through the AVR compiler directly). The Arduino preferences file can specify the /build directory, and the save options for a given build. The elf file (firmware image) can then be uploaded to the calculator (Intel Edison) via scp... a symbolic link is then established between the elf file and 'sketch.elf' like this:

ln -sf Edison-Binary-Calculator.cpp.elf sketch.elf

... then reboot the edison, or give the launch process a SIGHUP .

No more flash cables, no more intermediate failures, no bricked devices, and no headaches. How much fun is that? ... very cool.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-27-2015, 09:39 AM
Post: #31
RE: Intel Edison generic calculator shield photo journal
Hello,
Just a question. Have you tried to build RPL/2 ? I have seen that it runs fine on raspberry PI and some other SoC but I don't have any Edison SoC to test.

Regards,

JKB
Find all posts by this user
Quote this message in a reply
03-27-2015, 10:37 AM
Post: #32
RE: Intel Edison generic calculator shield photo journal
(03-27-2015 09:39 AM)JKB Wrote:  Just a question. Have you tried to build RPL/2 ? I have seen that it runs fine on raspberry PI and some other SoC but I don't have any Edison SoC to test.

If it runs on your desktop PC, it will run on the Edison in all likelihood.


- Pauli
Find all posts by this user
Quote this message in a reply
03-27-2015, 01:42 PM
Post: #33
RE: Intel Edison generic calculator shield photo journal
(03-27-2015 10:37 AM)Paul Dale Wrote:  
(03-27-2015 09:39 AM)JKB Wrote:  Just a question. Have you tried to build RPL/2 ? I have seen that it runs fine on raspberry PI and some other SoC but I don't have any Edison SoC to test.

If it runs on your desktop PC, it will run on the Edison in all likelihood.


- Pauli
Sure, but I would know if it is usable...

JKB
Find all posts by this user
Quote this message in a reply
03-27-2015, 10:31 PM
Post: #34
RE: Intel Edison generic calculator shield photo journal
(03-27-2015 09:39 AM)JKB Wrote:  Hello,
Just a question. Have you tried to build RPL/2 ? I have seen that it runs fine on raspberry PI and some other SoC but I don't have any Edison SoC to test.

Yes, it will run; and YES it is usable!

Just another reason to think in this direction. There is no reason to try and combine RPN and RPL... there needs to be an interactive keyboard calculator on the surface, but underneath there needs to be data collection, control (robotics, industrial), analytics, and collaboration. The 'calculator' should be keystroke programmable, RPL, Python, C|C++, and perhaps even BASIC. ... keep saying collaborative and connected/

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-27-2015, 10:39 PM (This post was last modified: 03-27-2015 10:40 PM by MarkHaysHarris777.)
Post: #35
RE: Intel Edison generic calculator shield photo journal
Greetings, before we get too far into this thing I really need to say 'Thank You' to Intel and their hard-working team of engineers, without whom this project would be for naught. Thank You Intel!
By the way, for any Intelites out there with any influence, I received a batch of stickers from the Arduino people in their little marketing boxes when I received their products. Yous guys need to market this board a little better; the little box is great, just saying, but put some stickers in there and improve the getting started doc for noobs. I realize that this is a grown-ups board, but if you want the Edison to really catch on, it really needs some better marketing. Just constructive words to the wise.

[Image: edison-cased_7-2.jpg] [Image: edison-cased_8-2.jpg]

Thanks again. Intel has stepped up to the plate and helped to improve the quality of life for everyone, especially us 'maker' guys and the rest of the DIY community. Go Intel !

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-28-2015, 01:22 AM (This post was last modified: 03-28-2015 06:10 AM by MarkHaysHarris777.)
Post: #36
RE: Intel Edison generic calculator shield photo journal
Greetings, well, this is mostly going to be a vision casting post, but also I will be sharing some code and some other things that I have learned this week regarding the Edison and hand-held calculation.

I have stated this a few times, but it does not hurt repeating-- I am not thinking about the hand-held calculator paradigm (stand-alone, not connected, non collaborative, buttons & display); that ship has sailed. I am thinking about a connected system (hardware & network) in which we have direct control of all things hardware (robotics and industrial control) as well as direct access with the network for complete analytics and collaboration... say over and over collaborative and connected. Some have thought the Edison is over-kill; here's a quote from one individual:

(03-23-2015 08:29 PM)matthiaspaul Wrote:  The Edison provides a compound processor with three cores, two Atoms running at 500 MHz and one Quark running at 100 MHz. One of them would be enough to accomplish the task. Also, we don't need 1 GB DRAM in a calculator. 32 MB would be more than enough.

The Quark (dedicated MCU) is going to handle data collection (all types, but I'm thinking specifically scientific) and the Atom(s) are going to handle the analytics. The Quark keeps us connected to the hardware world, and the Atom(s) keep us connected (and collaborating) with the networked world. In such a system we have, as it were, the best of both worlds.

The best part of this plan is its openness and simplicity. Intel has done all of the really hard work. What are we going to make?

If anyone would like to try the Edison, feel free to contact me directly if you get stuck... the getting started docs are not as user friendly as the Arduino docs, and there are some assumptions about the user's knowledge of open systems like gnu/linux. I might be able to help get you going and save you some headaches.

Well, its time to get serious about this/ my generic calculator framework is under way (keyboard build, voltage distribution for all three primary boards) and I've started with the real software on the Intel Edison (very excited about that):

notes:
The code responsible for starting the '/sketch/sketch.elf' file is the clloader service. Restarting the clloader service will start a 'sketch' or restart a crashed sketch. The following commands will start a new sketch uploaded via wifi to /shetch/

ln -sf name-of-new-sketch.cpp.elf sketch.elf
systemctl restart clloader

... the first command sets a symbolic link from 'sketch.elf' to the new sketch just uploaded. 'sketch.elf' is hard coded in the clloader.h file (see sources)/ The second command restarts the clloader service which re-reads the new sketch.elf file through the symbolic link and then runs the new sketch. How cool is that? This means that the unit does not 'require' connection to the pc via usb micro connectors; in fact, no connectors are needed at all!


Some codes:
I thought I might share the codes that I have had running in my edison for a couple of days to check out the MCU and work a bit with the system on gnu/linux... this is a six channel 'LED flasher' with the catch that it doesn't just blink the LEDs... there is a binary LED counter, and a flash all-on all off routine. I'm using a segment LED, but you can use what ever LEDs you have. Be sure to have a level shifter in the middle (see my pics) because the edison is not going to be forgiving about voltage mis-match like the Arduino. Also, I have included an input button that switches between binary counting and 'flashing'. Unlike the Arduino, you will need to include your own pullup resistor.

Code:

/*
  Blinker-Binary-LAB-Intel-Edison

  modified 3-26-2015
  by Mark H. Harris
 */

int k= -1;

void blink_line_13(int count, int on_13, int off_13) {
    int i=0;
    for (int i = 1; i <= count; i++) {
        digitalWrite(13, HIGH);
        delay(on_13);
        digitalWrite(13, LOW);
        delay(off_13);
        }     
    }

// the setup function runs once when you press reset or power the board
void setup() {
  pinMode(13, OUTPUT);             // GP40,  edison J19-10
  pinMode(12, OUTPUT);             // GP42,  edison J20-9
  pinMode(11, OUTPUT);             // GP43,  edison J19-11
  pinMode(10, OUTPUT);             // GP41,  edison J20-10
  pinMode(9, OUTPUT);              // GP183,  edison J18-8
  pinMode(8, OUTPUT);              // GP49,  edison J20-6
  pinMode(5, INPUT_PULLUP);        // GP13,  edison J18-1
  allOff2();
  delay(1000);
  blink_line_13(7, 300, 200);
}

// the loop function runs over and over again forever

void loop() {
  delay(200);
  binaryBlinker6Digital(500);
  allBlink2();
  
}

void allBlink2() {
  while (1) {
    allOn2();
    read5Delay(200);
    allOff2();
    read5Delay(200);
    if (k==0) break;
  }
  allOff2();
  k= -1;
}

void read5Delay(int delayValue) {
    if (digitalRead(5) == LOW) k=0;
    delay(delayValue);
}

void allOff2(void) {
      digitalWrite(13, LOW);
      digitalWrite(12, LOW);
      digitalWrite(11, LOW);
      digitalWrite(10, LOW);
      digitalWrite(9, LOW);
      digitalWrite(8, LOW);
}

void allOn2(void) {
      digitalWrite(8, HIGH);
      digitalWrite(9, HIGH);
      digitalWrite(10, HIGH);  
      digitalWrite(11, HIGH);
      digitalWrite(12, HIGH);
      digitalWrite(13, HIGH);  
}

void binaryDisplay6Digital(int disp_val) {
    int i=0;
    int linenum=8;
    int bindigit=1;
    for (i=1; i<=6; i++) {
       if (disp_val & (int) bindigit) {
          digitalWrite(linenum, HIGH);
       } else {
          digitalWrite(linenum, LOW);
       }
       bindigit *= 2;
       linenum++;
    }
}

void binaryBlinker6Digital(int delay_t) {
  int i=0;
  while (1) {
    binaryDisplay6Digital(++i);
    read5Delay(delay_t);
    if (k==0) break;
  }
  k=-1;
  allOff2();
}

-

Good evening, and good weekend to all...

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-30-2015, 12:48 AM (This post was last modified: 03-30-2015 06:02 AM by MarkHaysHarris777.)
Post: #37
RE: Intel Edison generic calculator shield photo journal
Greetings, I hope everyone has enjoyed a pleasant palm Sunday... I am discovering that more than one prototyping option needs to be considered while working with the Edison. For instance, the Edison supports 12 bit analog inputs with the readAnalogResolution() routine; however, the Edison itself, nor the mini breakout board, contains the actual ADC block hardware ( TI ADS7951 or equivalent). In production this chip is easily added. From a prototyping standpoint there are two options: 1) the Arduino breakout kit for the Edison, or 2) the Sparkfun ADC breakout board for and Edison. An Edison ADC is also available for 'the stack'.

A GPIO base board is also available to support the edison stack while prototyping, from Sparkfun.

I have also discovered that while the Quark MCU is powerful and flexible, often it is desirable to have a dedicated MCU on the the board like an Atmega328; to handle exclusively display and keyboard I|O, while the Edison's Quark is free for data gathering, and the Atom(s) are free for analytics. Things to think about.

I am also rethinking Matthias' keyboard suggestion... a more conventional approach with multiplexed | decoded scan lines and input lines on a diode matrix (seven rather than 5) may be actually simpler, all things considered; still researching.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-30-2015, 06:03 AM
Post: #38
RE: Intel Edison generic calculator shield photo journal
... edited some links on the previous post.

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-30-2015, 12:38 PM
Post: #39
RE: Intel Edison generic calculator shield photo journal
(03-30-2015 12:48 AM)MarkHaysHarris777 Wrote:  I have also discovered that while the Quark MCU is powerful and flexible, often it is desirable to have a dedicated MCU on the the board like an Atmega328; to handle exclusively display and keyboard I|O, while the Edison's Quark is free for data gathering, and the Atom(s) are free for analytics. Things to think about.

For display... perhaps, depending on how much you intend to draw on the display and its resolution, but for keyboard? All you need is an interrupt line, it takes zero CPU effort until you press a key, and then your keyboard driver will be finished in only a few microseconds.
I don't see how you could justify the complexity and power of an additional MCU only to read a keyboard matrix. Just passing information from one CPU to the other would be more complex than reading the keyboard directly from the main CPU.

Claudio
Find all posts by this user
Quote this message in a reply
03-30-2015, 09:25 PM (This post was last modified: 03-30-2015 09:27 PM by MarkHaysHarris777.)
Post: #40
RE: Intel Edison generic calculator shield photo journal
(03-30-2015 12:38 PM)Claudio L. Wrote:  I don't see how you could justify the complexity and power of an additional MCU only to read a keyboard matrix. Just passing information from one CPU to the other would be more complex than reading the keyboard directly from the main CPU.

Perhaps not. Allow me to explain how the keyboard scan would work in a more classic way with scan lines and input interrupt lines. I'll attempt to do this without a schematic, and if that is not successful I will also provide the schematic as well (I'm just aching to try "Fritzing")

The first way is simpler; uses the MCU (Edison Quark) and an additional 74HC154 4:16 multiplexer|decoder, 4 scan lines, and 3 input interrupt lines (there may be diodes on the switches (also caps) to help with debouncing, but we'll leave that out for now).

The keyboard matrix is a 'logical' 16x3 matrix. The sixteen logical 'rows' are being scanned continuously (twenty times per second) by the MCU 'counting' from 0 to F on the four lines output to the 74HC154 decoder, which in turn pulls one of the 16 logical row lines low. If a switch is pressed on that 'row' line, then an interrupt will trigger on the associated 'column' input line. ( because we are not using any kind of latch on the scan lines, interrupts will need to be disabled while the counter is being setup and re-enabled once the counter is ready)

Because of contact bouncing, the interrupt routine (one for each logical 'column' ) will need to reaffirm that the logical 'row' is correct and that the button presumed is actually the button being held down. This is done with 'counting' and reading (very simple, just processing).

Assuming the interrupts are immediate, that the scanner 'counter' is paused correctly at the 'row' selected, then the interrupt column ID combined with the scanner counter value can be used arithmetically to arrive at a correct unique key code.

All of that is handled in the MCU (its more than you think). The Quark may be able to handle this quite nicely as well as doing the data gathering (it will take some experimenting).

---

A slightly more complicated way is to place a serial shift register with latch enable between the 74HC154 and the key matrix. This reduces the overall lines from the MCU to six... three to talk to the shift register (SPI), and three input interrupt lines. Logically, the idea is still the same; the keyboard is scanned continuously by the MCU until an interrupt fires (the key is affirmed and passed on to the analytics) and the scanning resumes.

One way to handle this is to put the dedicated MCU on the keyboard backplane (atmega328) along with the support chips. Then have the 'keyboard' talk to the Edison via SPI or via I2C. (I really cannot believe someone has not built a generic keyboard for these kinds of purposes yet)

There is definitely more than one way to skin this possum, as it were. Back in the day we used specialized chips like the 8279 and 8250 to handle keyboard matrix scanning|decoding. But, we don't need the 8279 these days because we have our own MCU and we can do it our way... theoretically.



Cheers,
marcus
Smile

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




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