OpenCores

OpenCores is an open source hardware community developing digital open source hardware through electronic design automation, with a similar ethos to the free software movement. OpenCores hopes to eliminate redundant design work and slash development costs. A number of companies have been reported as adopting OpenCores IP in chips,[1][2]or as adjuncts to EDA tools.[3][4] OpenCores is also cited from time to time in the electronics press as an example of open source in the electronics hardware community, for example,[5]

OpenCores has always been a commercially owned organization. In 2015, the core active users of OpenCores established the independent Free and Open Source Silicon Foundation (FOSSi), and registered the libreCores.org website, as the basis for all future development, independent of commercial control.

Source: OpenCores – Wikipedia

OpenCores was last modified: September 25th, 2017 by Jovan Stosic

Project management triangle

The Project Management Triangle (called also Triple Constraint or the Iron Triangle) is a model of the constraints of project management. It is a graphic aid where the three attributes show on the corners of the triangle to show opposition. It is useful to help with intentionally choosing project biases, or analyzing the goals of a project.[1] It is used to illustrate that project management success is measured by the project team‘s ability to manage the project, so that the expected results are produced while managing time and cost.[2][3][4]

Like any human undertaking, projects need to be performed and delivered under certain constraints. Traditionally, these constraints have been listed as “scope” (features and quality), “time”, and “cost”.[5]These are also referred to as the “Project Management Triangle,” where each side represents a constraint. One side of the triangle cannot be changed without affecting the others. A further refinement of the constraints separates product “quality” or “performance” from scope, and turns quality into a fourth constraint.

Source: Project management triangle – Wikipedia

Project management triangle was last modified: September 25th, 2017 by Jovan Stosic

433 Mhz interference – causes? – DoItYourself.com Community Forums

This is a weird one so bear with me.

I installed a remote starter in my car about 2 years ago. It will decide to ignore the key fob commands at random. It will last for a few days and then be fine again. Over time I began to realize that this was only occurring in my driveway.

Recently I installed a new garage door opener. The opener comes with this nifty light fixture that you plug into any outlet in the garage. It receives its on/off commands from the motor housing. It worked fine for a few days and then stopped working. Not putting 2+2 together I demanded a replacement fixture from the manufacturer. Then the light went on (in my head, pun intended). That light fixture stopped working the same day my remote starter stopped working.

I did some investigation and it turns out both operate at 433 Mhz. I also found that if I move the light so that its receiver antenna is close enough to almost touch the transmitter it will work. Get a few inches away and it doesn’t work. Ditto with the car remote. If I put the key fob right up against the antenna wire it will work. Otherwise no dice. I’ve confirmed that they are not interfering with each other.

So I have a few questions:

1) What sort of everyday (or non-everyday) device could be transmitting strong enough to cancel out my other 433 Mhz devices?

2) What’s a typical range of a 433 Mhz signal?

I did some experimentation and my car remote begins to function once I’m about 200 feet away from my house. Further experimentation seems to point to the interference coming from me or the people across the street from me. Being a gadget-type person I suspect I’m the cause of my own problems.

Any ideas?

Source: 433 Mhz interference – causes? – DoItYourself.com Community Forums

433 Mhz interference – causes? – DoItYourself.com Community Forums was last modified: July 13th, 2017 by Jovan Stosic

Resolved: Does ethercard browseurl callback duplicate callback with persistTcpConnection ? – JeeLabs Café – JeeLabs . net

Am now starting to understand the browseurl and callback now – but still can’t find an explanation for all the parameters in the callback function.

static void my_callback (byte status, word off, word len)

‘ status ’ – I can not find explanation for this – please help if you know what values can be passed here, and what they mean / represent.

IF I understand this correctly :

When browseurl is first called, it runs asynchronous, until ethernet data arrives, and that buffer is then passed to the callback function.

The first callback has the offset = 54 and len = 512.
If this is the first call, why is there an offset ? Should the data not start at position 1 in the buffer ?

Next, with the use of persistTcpConnection, the browseurl will continue to run until the end of the stream of data ( in 512k blocks ) from the web server arrives.

Does the callback wait to complete its code before the next callback is activated ?

What happens if the second browseurl modifies the buffer while the code in the callback is still busy working with it.

For example, in my callback I have :

static void my_callback (byte status, word off, word len) {
    Serial.println("my_callback initiated");
    Serial.print("Status : ");   Serial.println(status);
    Serial.print("off : ");         Serial.println(off);
    Serial.print("len : ");         Serial.println(len);
    Serial.println((const char*) Ethernet::buffer + off);

    Ethernet::buffer[off+len] = 0;  // after the offset and the length, add an end marker .. is this correct ?  Sample codes showed [off + 300]

    WriteSDfile(2,0,((char*) Ethernet::buffer + off)); // now I need to write ( append ) the data in the buffer to an SD card file ( file number 2, no erase, data to append to file )

    Ethernet::buffer[0] = 0;  // set the end market to the start of the buffer so next received block of data is at the start of the buffer

        if(len != 512){  // if this is the last block of data ( less than len 512 ) then echo the SD Card Data to the Serial Monitor
        Serial.println("......................................");
            Serial.println("Reading Contents of File 2");
        Serial.println("......................................");
            ReadSDfile(2);
        }   
}

Or, is the code in the callback run, and must complete all of its code in the function before the callback can accept new data in the buffer in the next loop of the script execution ?

If this is the case, can the ethernet module modify the data in the ( existing ) buffer while the first instance of the callback function is still trying to process the code.

Would it be better to copy the buffer to a second byte array at the start of the callback, clear the buffer ( Ethernet::buffer[0] = 0; ) and then work with the copy array ?

I would really appreciate any advice here.

Source: Resolved: Does ethercard browseurl callback duplicate callback with persistTcpConnection ? – JeeLabs Café – JeeLabs . net

Resolved: Does ethercard browseurl callback duplicate callback with persistTcpConnection ? – JeeLabs Café – JeeLabs . net was last modified: July 13th, 2017 by Jovan Stosic

VLOOKUP Example Spreadsheet & Tutorial | Productivity Portfolio

How to do VLOOKUP in Excel

As every September approaches, I can count on a series of spreadsheet questions. One popular Excel tutorial request is, “how do you look up a value on one Excel worksheet and use it on another Excel worksheet?”. For example, you need to translate a product number into a product name. One of my favorite Excel features is the VLOOKUP function and it can help with this task. (See Resources section at the end for a video tutorial and sample worksheets.)

A recent case involved some voter registration data I needed to analyze. On one Excel spreadsheet, the voter’s party was listed as an alphanumeric value called “Pcode” and not the political party. This coding wasn’t intuitive. For example, “D” was for “American Independent Party”, but some thought it meant “Democratic Party”.

Pcode column requiring a lookup

Non-intuitive column needing a lookup

One way to solve this problem is to create a worksheet with the Pcode and translation and have Excel use the VLOOKUP function for the party name. You might think of VLOOKUP as an Excel translator. I could then add a column called “Political Party” to my original worksheet to show the information from a lookup table.

Creating a Lookup Table

A lookup table includes the values you wish to “lookup” such as our Pcode and the translation such as a political party. You can place this table on the same worksheet, but for this Excel tutorial I added a worksheet called “Party Codes”.

Using the Starting VLOOKUP Example File,

  1. Download the starting Excel sample file. The file link is also at the bottom of this tutorial.
  2. Review Worksheet 1 called “Voters”. It has voter first and last names, but only a PCODE.
  3. Review Worksheet 2 called “Party Codes”. It has a listing of party codes and political names. Each of the Party Codes and Names are unique. You’ll also note that Column A is in ascending order.
Excel worksheet with vlookup values

Worksheet with Translated Code Names

Using the Function

Excel’s VLOOKUP function uses 4 pieces of information. The function panel may seem intimidating with the terms, but it’s simpler than it looks.

To lookup a value using VLOOKUP,

    1. Add your new column on the Voters worksheet that will display the info pulled from the Lookup table on Party Codes. In my example, I added a column called Political Party in Column D. This is where I will insert the Excel function.
New Excel column for lookup values

Add a new Excel column for lookup values

    1. Place your cursor in the first blank cell in that column. In my example, this is cell D2.
    2. From the Formulas tab, select Insert Function. The Insert Function dialog will appear.
Inserting the VLOOKUP function

Inserting the VLOOKUP function

  1. In the Search for a function: text box, type “vlookup” and click Go.
  2. Highlight VLOOKUP and click OK.

Defining the Values

After you click OK, Excel’s Function Arguments dialog appears and allows you to define the four values. You’ll see that your starting cell and the formula bar show the beginning part of the function =VLOOKUP(). The Function Arguments dialog adds the needed data elements that will display between ().

For illustration purposes, I have overlaid the Party Codes worksheet on top to show the relationships.

Mapping the VLOOKUP Function Arguments

Mapping the VLOOKUP Function Arguments

1. Lookup_value – Think of this field as your starting point. In my example, I’ll click cell C2 so the value is filled in the dialog. I’m requesting Excel take the value of C2, which displays as the Pcode of “A” and find the matching political party on my lookup table on the Party Codes worksheet.

2. Table_array – This is the range for your lookup table. The range can be on your existing worksheet or another worksheet such as our “Party Codes”. When you click another worksheet and define the range, Excel prepends that tab name to the range such as ‘Party Codes’. In our case, I clicked the Party Codes worksheet and selected the range A2:B45.

Rules & Caveats

There are several rules to remember about this table array.

  • Rule 1 – The left column must contain the values being referenced. In other words, I couldn’t have our first column be NAME.
  • Rule 2 – You can’t have duplicate values in the leftmost column of the lookup range. I couldn’t have two entries with the value “A” with one being “Democratic” party and another “A” for the “Humanist” party. Excel would complain.
  • Rule 3 – When referring to a lookup table, you don’t want your cell references to change when you drag and fill to populate the other cells with the VLOOKUP function. As an example, if I want to use the same function in cells D3 through D7, I don’t want my lookup cell references shifting each time I move down to the next cell. I need the cell references to be the same. After you define your range, you need to press F4 which will cycle through absolute and relative references. You want to select the option that includes a $ before your Column and Row. ( ‘Party Codes’!$A$2:$B$45. ) You can get around this if you know how to use Excel name ranges.

3. Col_index_num – This is the number of the column on your lookup table that has the information you need. In our example, we want column 2 from the Party Codes worksheet which has the NAME of the political party.

4. Range-lookup – this field defines how close a match should exist between your Lookup_value (C2) and the value in the leftmost column on our lookup table. In our case, we want an exact match so we’ll use “FALSE”.

After clicking various cells, my dialog looks like the example below.

Mapped Values from Both Worksheets

Mapped Values from Both Worksheets

You can see in the red outlined formula bar above, I now have more information based on my entries in the Function Arguments dialog box.

The other item of interest is that when you build these functions, Excel displays the result in the Formula result = text line. This is great feedback which can show if your function is on target. In our example, we can see Excel looked up the Pcode of “A” and returned the Political Party “Democratic”.

Copying the VLOOKUP Function to Other Cells

It doesn’t make sense to use VLOOKUP for one cell in your Excel spreadsheet. Instead, I want to copy the function to other cells in the same column.

To copy VLOOKUP to other column cells,

  1. Click the cell containing the VLOOKUP arguments. In our example, this would be D2.
  2. Make sure you changed your Table_array entry per Rule 3 above – Party Codes’!$A$2:$B$45.
  3. Grab the cell handle that displays in the lower right corner.
  4. Left-click and drag down the cell handle to cover your column range. You can also double-click the bottom-right corner of the fill handle.

Note: If I hadn’t changed to absolute reference as mentioned in Rule 3, I would’ve seen my table array entry shift by one cell as we dragged down through the other cells.

VLOOKUP is a powerful Excel function that can leverage spreadsheet data from other sources. There are many ways you can benefit from this function. In this example, I used a 1:1 code translation, but you could also use it for group assignments. For example, you could assign state codes to a region such as CT, VT, and MA to a region called “New England”. And for the adventurous, you can use VLOOKUP in your Excel formulas.

If you’re trying to a do a horizontal lookup, you’ll be happy to learn that Excel has a function for that called HLOOKUP. I haven’t done a HLOOKUP tutorial here, but there is a good one over at Deskbright I’d suggest you read.

Source: VLOOKUP Example Spreadsheet & Tutorial | Productivity Portfolio

VLOOKUP Example Spreadsheet & Tutorial | Productivity Portfolio was last modified: July 13th, 2017 by Jovan Stosic

EtherCard: relationship between Stash and ether.buffer – JeeLabs Café – JeeLabs . net

I’d like to understand the EtherCard Stash concept better. I’ve read the source code enough that I think I understand the concept, but I’m more of a C guy than a C++ guy so I get a little bit lost in the inheritance from Print. My understanding is that it is meant to store the body of a TCP packet (e.g. an HTTP POST) in the ENC28J60’s RAM. I’ve recently written some EtherCard code that tries to take advantage of it by doing something like the following code snippet:

  byte Ethernet::buffer[800];
  Stash stash;
  byte session_id = 0;

  void postToWeb(){

    byte sd = stash.create();

    for(int ii = 0; ii < SOME_NUMBER; ii++){
      stash.println(ii);
    }

    stash.save();
    Stash::prepare(PSTR("POST /blah HTTP/1.1\r\n"
                        "Host: $F" "\r\n"
                        "Content-Length: $D" "\r\n"
                        "\r\n"
                        "$H"),
                   PSTR("google.com"), stash.size(), sd); 

    session_id = ether.tcpSend();  
    Serial.println(F(" >>> Message Sent"));
  }

  // the usual controller setup and loop: 
  //   ether.packetLoop(ether.packetReceive());
  //   const char* reply = ether.tcpReply(session_id);
  //   if(reply != 0) Serial.println(F(" <<< Response Received"));

Now, seemingly, depending on the size of SOME_NUMBER the tcpSend() doesn’t actually result in a transmission on the wire. There is rather some semblance of a TCP connection starting up, but it never establishes, and I get some pretty interesting side effects. For example, ether.isLinkUp() will start reporting false, suggesting that I’ve really made the ENC28J60 unhappy, and the only way back is a restart. When I was printing out stash.size() before sending, the point of no return seemed to be related to the Ethernet::buffer size, but I didn’t see how.

So, please when you have some spare time, could you try and explain the Stash concept in more detail, how it relates to the Ethernet::buffer and/or the BufferFiller class if at all, what kind of limitations need to be respected and in what way my code snippet above is violating them? I hesitated to write this up as an issue on git-hub until I really understood what was happening and that it wasn’t PEBKAC.

Thanks and Merry Christmas!

Vic

Source: EtherCard: relationship between Stash and ether.buffer – JeeLabs Café – JeeLabs . net

EtherCard: relationship between Stash and ether.buffer – JeeLabs Café – JeeLabs . net was last modified: July 13th, 2017 by Jovan Stosic

ENC28J60 losing the connection after some time.

First of all, Hello to all, my first post here.

I have an arduino uno, which I am connecting to ENC28J60 and using the ethercard library.
I have uploaded the backSoon example to the uno with a static IP 192.168.1.9

Everything works for some time (sometimes for a few minutes whereas, sometimes only for as long as 30 seconds ), but then it stops responding. The green light on ENC28J60 is on and the orange one keeps blinking, but the web page isn’t delivered.

Source: ENC28J60 losing the connection after some time.

ENC28J60 losing the connection after some time. was last modified: July 13th, 2017 by Jovan Stosic