Sump Logic Analyser + omla32, GadgetFactory Butterfly,

November 28, 2009 by charliex2

Just  a quick note if you’re using the omla32+digilient+sump, if it connects but won’t download. then the IDC’s might be jaffed up, they’re real loose on the digilent board. That’s what was wrong with mine at least.

 

I also picked up http://www.Gadgetfactory.net butterfly to see how it works as an LA, it doesn’t have the same protection as the digilent+omla32 so I’ve done very little with it,except verify it works with a 2V 12.5Mhz square wave.  The digilent is a bit awkward to use off the bench, so this is a lot smaller and it exposes more of the FPGA like the SparkFun board does.

 

 

Was easy enough to run, plug in USB, upload bitfile and run the Java LA, Jack has included a JRE with it, which is a good idea, smal tip is that the uploader batch file doesn’t work from the command line unless you give it a full path, I’d imagine he’s only ever used it from explorer which always provides a full path.

 

Slowly wiring up the flash chip, 44 pins!

fpga_la

Hacking the Dream Cheeky USB LED Message Board

November 24, 2009 by charliex2

 Dream Cheeky

 

For some reason I always pick up these dumb scrolling message things at Fry’s, first one had an embedded uC that Furan had hacked by RE’ing the wires and installing a new uC, this one has USB but doesn’t work without the program running on the Host PC….

 

So lets hack it..

 

First thing is that it is a USB HID , so that is fairly straightforward. HID Write comes into play here. Jan Axelson is pretty much the standard for USB/serial etc http://www.lvr.com/hidpage.htm

 

shw

shw1

 

A quick poke around the bytes look like, brightness, location, data. 0xFF is all off, 0×00 all on. right most byte is left most on the display at 0×00 0×00 0xFF 0xFF 0xFF 0xFF 0×00

First byte is brightness

Second byte is vertical row 0×5 is the bottom, two lines are written at once. If you give it 0×6 it’ll write the first line to the last row, then wrap after a few that disappear.

It takes 0×9 message length, and no read back.

That’s it on the hardware side really!

 

Using usbhido_vc6 as an example, all you have to do is FindHid() with the VID/PID set, and then do

 

I just threw in some junk code to show it working

 

if( MyDeviceDetected ) {

    // always
    OutputReport[0 ] = 0×0;

    // brightness 0 .. 15
    OutputReport[1 ] = 15;

    OutputReport[2 ] = row;

    row+=2;

    row%=8;

    // fill in some random data
    for( int i= 3 ; i < 10 ;i ++ ) {
        OutputReport[i]++;;
    }

    if (WriteHandle != INVALID_HANDLE_VALUE)
    {
        HRESULT Result = HidD_SetOutputReport
            (WriteHandle,
            OutputReport,
            9); // fixed length (comes from device report)
    }
}

 

It’s trivial to treat the output as a frame buffer, 21×7

so the header of the OutputReport[] looks like

offset 0, always 00
offset 1, brightness, 0-15
offset 2, row *2

then the remaining bytes are

offset 3,   0×00 – right hand side 5 LEDS on
offset 4,   0×00 – middle 8 LEDS all on
offset 5,   0×00 – left 8 LEDS all on

offset 6,   0×00 – right hand side 5 leds on , second row
offset 7,   0×00 – middle 8 LEDS all on, second row
offset 8,   0×00 – left 8 LEDS all on, second row

0xfe in an 8 LED cell, would mean the leftmost LED was ON and the others off

0xaa would be ON,OFF,ON,OFF,ON,OFF since the leds are reversed, since 1 is LED off.

a quick #define in c for the 5 LED’s

#define LED_5(a,b,c,d,e) ( (!e<<4) + (!d<<3) + (!c<<2) + (!b<<1) + (!a) )

The 8’s

#define LED_8(a,b,c,d,e,f,g,h) ( (!h<<7) + (!g<<6) + (!f<<5) + (!e<<4) + (!d<<3) + (!c<<2) + (!b<<1) + (!a) )

You can use the 8 macro for the 5 LEDs, since it ignores the top ones, so LED_8(1,1,1,1,1,0,0,0) is equivalent to LED_5(1,1,1,1,1)

One whole row, left to right would be

OutputReport[5] = LED_8(1,1,1,1 ,1,1,1,1) ;
OutputReport[4] = LED_8(1,1,1,1, 1,1,1,1) ;
OutputReport[3] = LED_8(1,1,1,1 ,1,0,0,0) ;

 

And some equally hacky code just to see if the above all works in principle.

 

#define LED_8(a,b,c,d,e,f,g,h) ( (!h<<7) + (!g<<6) + (!f<<5) + (!e<<4) + (!d<<3) + (!c<<2) + (!b<<1) + (!a) )

#define FB(x) (framebuffer[x + (y*21)]?1:0)

#define _ 0
#define W 1

unsigned char framebuffer[21 * 7] = {
   W, _, W, _, W, W, _, W, _, _, W, _, _, W, W, W, _, W, _, W, _,
   W, _, W, _, W, _, _, W, _, _, W, _, _, W, _, W, _, W, _, W, _,
   W, _, W, _, W, _, _, W, _, _, W, _, _, W, _, W, _, W, _, W, _,
   W, W, W, _, W, W, _, W, _, _, W, _, _, W, _, W, _, W, _, W, _,
   W, _, W, _, W, _, _, W, _, _, W, _, _, W, _, W, _, W, _, W, _,
   W, _, W, _, W, _, _, W, _, _, W, _, _, W, _, W, _, _, _, _, _,
   W, _, W, _, W, W, _, W, W, _, W, W, _, W, W, W, _, W, _, W, _
};
#undef _
#undef W

void CCreamDeekyDlg::OnTimer(UINT_PTR nIDEvent)
{
    int y;

    CDialog::OnTimer(nIDEvent);

    if( MyDeviceDetected ) {

        for( y = 0 ; y < 7 ; y++ ) {

            // always
            OutputReport[0 ] = 0×0;

            // brightness 0 .. 15
            OutputReport[1 ] = 1;

            OutputReport[2 ] = y;

            OutputReport[5] = LED_8(FB( 0),FB( 1),FB( 2),FB( 3),FB( 4),FB( 5),FB( 6),FB( 7));
            OutputReport[4] = LED_8(FB( 8),FB( 9),FB(10),FB(11),FB(12),FB(13),FB(14),FB(15));
            OutputReport[3] = LED_8(FB(16),FB(17),FB(18),FB(19),FB(20),0,0,0);

            y++;
            OutputReport[8] = LED_8(FB( 0),FB( 1),FB( 2),FB( 3),FB( 4),FB( 5),FB( 6),FB( 7));
            OutputReport[7] = LED_8(FB( 8),FB( 9),FB(10),FB(11),FB(12),FB(13),FB(14),FB(15));
            OutputReport[6] = LED_8(FB(16),FB(17),FB(18),FB(19),FB(20),0,0,0);

            if (WriteHandle != INVALID_HANDLE_VALUE)
            {
                HRESULT Result = HidD_SetOutputReport
                    (WriteHandle,
                    OutputReport,
                    9);
            }
        }
    }
}

and it does , that’s brightness level 1, but its an iPhone..

IMG_1134

 

Next i think i’ll see if i can implement per LED brightness, I’m hoping POV will let me write multiple times on the same row.

The long way round…

October 20, 2009 by charliex2

I’ve been playing around with FPGA’s, and using Xlinx Spartan 3 from Digilent, I mainly wanted it for the Sump Logic Analyser, but now branching out with it a bit, lets ignore the nightmare install that ISE Webpack is, then the fact that Digilent boards don’t work with the ISE programming tools and focus on the rest of the oddness..

First off VITAL, this is a library that ought to be in the IEEE lib’s, but for some reason ( possibly being a cut down version of the software,  but if so wouldn’t it be nice if it said so ) . I managed to get this up and running by installing some software that had a VITAL2000 source code ( vhd’s) and adding them to my project as a new library, changed the USE and LIBRARY options to use VITAL2000 and VITAL_timing_2000 ( the lib i have appends _2000 to all of them ) , then its a case of marking some of the functions IMPURE, they’re just warnings so not really needed. XIinx’s website is no good, and their support forum didn’t turn up anything either.

I even switched to Altera Quartus at one point, but that had similar issues, seems they only have VITAL95 support, and I ran into other issues with it too.

After that the FMF library needs to be updated to use the new LIBRARY and USE settings… So i finally get to the point where the FMF library compiles, the VITAL2000 compiles, and off it goes to compile the model I’m using, brrp! nope, some mysterious error about ‘Port being unsupported in  a Block concurrent statement’  over on the FMF site someone’s noted it from an old build and the admin is wondering if ISE WebPack is indeed a crippled version.

As much used to cross development toolsets and so on, the FPGA has been the most difficult and painful route I’ve ever taken, and I’ve worked on some bizarre stuff, the programming itself is easy enough but the dev tools and support are horrible, I guess you just get spoiled by Microsoft’s level of  devtool’s and support.

 

Anyway my ‘allotment’ for FPGA time is up for today, so I figured jot down a note that i can fill in later., and hoping that the FMF admin will have a solution..

Re-laid out, changed SOIC-16 to SOIC-16DW

October 16, 2009 by charliex2

A360_Test-013_small

For some reason, which i haven’t checked yet the mill line routed around it, instead of through it, which caused it to be larger. I had this issue once before, last time i used the rectangle tool and this time the line tool, since i wanted a gap, which I set to two 0.05” grid spaces, that was slightly too much. I also cut it a bit deeper when doing the isolation routing.

 

tooltable

I built the tool table this time. Which means you get something like this –>

change_tool

However I did notice that it refers to T0 which is the bit number in the specific tool list, there are three 1. Isolate 2. Drill and 3. Route. So instead of getting the index from the master tool table, you get the one from the subset. It also counts from 0 for the tool change prompt, but the master Tool Table counts from 1. Also on the isolation rubout, it adds the isolate size to your set, so if you define 3 bits in the drill tool table, it’ll add one ( if its not already included ) and that one will be the isolate bit, usually the V90/60/45

Working Board? Accurate CNC 560

October 14, 2009 by charliex2

Though its got some funky routing :)   and i didn’t quite drill all the way through, this board seems to be right.

 

A360_Test 011_small

 

I redesigned it a bit and recut it, a small error in one of the rubout tool changes. The main thing i wanted to get rid of was the trace in the middle left, that cuts through an 0603 package, though on the new one one of the transistors traces is going back under itself. I also scanned this one at  2400DPI, seemed to work better..

A360_Test 012 copy

Peek – Target $4.99

October 5, 2009 by charliex2

I just saw this on a shopping trip to target with the parents, A small keyboard/sim card/LCD bearing device for $4.99 … So I bought it, I paid more for the cup of coffee I had waiting for the folks to shop. It’s meant to be an email reader over 3g, subscription service.

 

This is what I’ve found after a few minutes with Google, Spansion memory, USB but serial to reflash,  TI LoCosto TCS2310/ARM7TDMI + TMS320C54x 104Mhz

Yet I haven’t seen any actual hacks on it yet, Peek seem to have a closed development list, but i see no further info on it.

 

company blog

http://www.geekypeek.com/

 

make

http://forums.makezine.com/comments.php?DiscussionID=5609

 

teardown by ‘the hammer’

http://forums.makezine.com/comments.php?DiscussionID=5609

http://hackaday.com/2008/09/15/peek-email-reader-teardown/

Datasheet link for the Spansion memory ( link from previous link is wrong)

http://www.spansion.com/Support/Datasheets/s71ns-n_00_a9_e.pdf

 

TI LoCosto

http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12774&contentId=15407

 

Interesting TI development device, OMAP though ( $1,299.41 ! )

http://omapzoom.org/

uses this 3,6” QVGA

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=460-3470-ND

 

blah once I’d discovered the firmware and JTAG socket, then i came across this page !

http://peeklinux.com/index.php/Main_Page

AccurateCNC PCB after cut/routing, stretched pulley belt

October 3, 2009 by charliex2

DSC02187

 DSC02188

 

Hand held video of it doing the cut, guess which part of the cut I forgot to switch on the vacuum for?  Now solved by adding the automatic vacuum switch.

I stretched the rubber pulley belt, so replaced it, at 60,000 RPM it goes wild, I just wish changing our supercharger pulley belts was as easy as this one.

Accurate CNC , Drill / router bits

October 3, 2009 by charliex2

 DSC02200

 DSC02198

DSC02199

 DSC02201

Accurate CNC 560 H

October 3, 2009 by charliex2

The first video I made of the machine cutting a PCB. The sharper eyed might notice the bit is the wrong type ( 18 mil drill vs a V bit!)

 

Cut testing, Pictures of the fiducial registration mode.

October 3, 2009 by charliex2

  The double sided PCB’s are helped out by the camera, you basically find two drill holes, align the camera to one, find the drill hole that matches on the gerber , centre the cursor on that , right click and it moves the Gerber’s to match, second hole does the rotation.

 

Drill Test, trying different depths with the V90 bit, the software has a couple of extra modes to help get rid of the bits that come loose if different drill paths are too close, one is an extra isolation remove. This one I haven’t tried yet, it cuts away a little extra isolation to help with potential shorts, the second mode is rubout, you define a rectangle in the mech layer, or in PhCNC and the software calculates which areas to remove leaving just the tracks, this is heavy on the drill bit usage and takes a lot longer, you end up changing tools maybe 3 or 4 times. The good thing is you can try out nearly everything the machine can do with the demo version of PhCNC (Except camera), it does a cut simulation too.  http://www.accuratecnc.com/download.html

side2_test1

 

Not deep enough, These next images are after the double sided cut , checking alignment, the blue areas are the drill path, the black is the copper left, as you can see they match up pretty good.

 

side2_test2

side2_test3

side2_test4 

drill_test 

drill_test2

 

 

Find and align the first drill hole. I just did a rough guess watching where on the PCB the camera was and then used X<> Y<> to find it, make sure you focus the camera first

fiducial_1

Then just match up the red circles as close as possible.