Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - s3c

1
AVRDude / BP V4 as STK500 with AVRStudio6
Has anyone played around with the BP V4 as an STK500 programmer. I can confirm that it doesn't work (for me at least) with AVRStudio6 with the V6.1 firmware. My understanding was that the STK500 firware was integrated? Does it have anything todo with this thread:

viewtopic.php?f=41&t=4207
2
Bus Pirate Support / Binary Raw wire not responding with read data.
I'm hoping someone can give me a quick kick to get me in the right direction, when using the binary raw wire mode I can confirm that the waveform is what I'm expecting (using the open logic analyzer) but the data returned by the bp is not correct, is there anything simple I'm overlooking?

Here's a screen shot of the read waveform:



Which reads back "ABCDE" from a device, the read function however returns 0 most of the time and a random value some others, I was thinking maybe the bp is using the wrong pin to read back the data? Here's the code:

Code: [Select]
    memset(data, 0, 24);
    for(loop = 0; loop < 24; loop++){
        data[loop] = sendcommand(hComm, CMD_READ_BYTE);
        printf("%d ", data[loop]);
        sleep(2);
    }

Code: [Select]
unsigned char sendcommand(HANDLE hComm, unsigned char command){
    int bytes_written, bytes_received;
    unsigned char received_byte;
   
    PurgeComm(hComm, PURGE_RXCLEAR);
    WriteFile(hComm, &command, 1, &bytes_written, 0);
    //sleep(2);
    ReadFile(hComm, &received_byte, 1, &bytes_received, 0);
   
    return received_byte;
}

The values printed are "0 0 0 0 ..."
3
Open Bench Logic Sniffer / ISE Webpack simulation woes.
I have a decent logic background and have started studying up on VHDL but I'm not ready to start writing some code just yet. After downloading the xilinx software I tried to do a simple schematic circuit and simulate the project, can anyone direct me on getting the simulations up and running. I've found reference on the web of a GUI waveform editor but can't seem to locate it. How do you define custom waveforms and assign them to input pins for running simulations?
4
Open Bench Logic Sniffer / Triggering tips and strange bus behaviour.
A while back I posted the circuit diagram for a hardware dongle I took apart:

http://dangerousprototypes.com/forum/index.php?topic=306.0

This is actually the immobilizer dongle for my car. I finally got around to playing around with it some more and hooked up the OLS. Some of the dumps made sense and others not so much, the bus pirate in I2C monitor mode made a lot more sense though, here's 3 consecutive dumps.

Code: [Select]
][0xA0+0x06+[0xA1+0x30+][][0xA0+0x05+[0xA1+0x03+][][0xA0+0x04+[0xA1+0xCE+]]]]]]

][0xA0+0x06+[0xA1+0x30+][][0xA0+0x05+[0xA1+0x03+][][0xA0+0x04+[0xA1+0xCE+]]]]

][0xA0+0x06+[0xA1+0x30+][][0xA0+0x05+[0xA1+0x03+][][0xA0+0x04+[0xA1+0xCE+]]]]]]

Easy enough to understand, it reads 3 bytes, byte 6, byte 5 and byte 4, in my case being 0x30, 0x3, 0xCE (Yes, you know have enough info to steal my car). I would simply have done one read of 3 bytes starting at location 4 and not 3 random reads but that's not the part that tickles me. Are the logic dumps wrong or is this design deliberately misleading.

I had some trouble getting these dumps as well, more than half the time getting only a blank output, I'd get a good dump, change the memory setting and then get nothing again, a fault on my part perhaps? If you're interested please take a look at the dumps and tell me what you think.
5
Bus Pirate Support / Seeedstudio 125KHz RFID reader.
So this isn't all that interesting but thought I'd post it anyway, I got one of the seeed RFID modules just for the hell of it:

Code: [Select]
?
General                                 Protocol interaction
---------------------------------------------------------------------------
?       This help                       (0)     List current macros
= X     Converts X                      (x)     Macro x
~       Selftest                        [       Start
#       Reset                           ]       Stop
$       Jump to bootloader              {       Start with read
&/%     Delay 1 us/ms                   }       Stop
a/A/@   AUXPIN (low/HI/READ)            "abc"   Send string
b       Set baudrate                    123
c/C     AUX assignment (aux/CS)         0x123
d/D     Measure ADC (once/CONT.)        0b110   Send value
f       Measure frequency               r       Read
g       Generate frequency/PWM          /       CLK hi
h       Commandhistory                         CLK lo
i       Versioninfo/statusinfo          ^       CLK tick
l/L     Bitorder (msb/LSB)              -       DAT hi
m       Change mode                     _       DAT lo
o       Set output type                 .       DAT read
p/P     Pullup resistors (off/ON)       !       Bit read
s       Script engine                   :       Repeat e.g. r:10
v       Show volts/states       <x>/<x= >/<0>   Usermacro x/assign x/list all
w/W     PSU (off/ON)
HiZ> m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. KEYB
9. LCD
x. exit(without change)

(1)> 3
Set serial port speed: (bps)
 1. 300
 2. 1200
 3. 2400
 4. 4800
 5. 9600
 6. 19200
 7. 38400
 8. 57600
 9. 115200
 10. 31250 (MIDI)

(1)> 5
Data bits and parity:
 1. 8, NONE *default
 2. 8, EVEN
 3. 8, ODD
 4. 9, NONE
(1)> 1
Stop bits:
 1. 1 *default
 2. 2
(1)> 1
Receive polarity:
 1. Idle 1 *default
 2. Idle 0
(1)> 1
Select output type:
 1. Open drain (H=Hi-Z, L=GND)
 2. Normal (H=3.3V, L=GND)

(1)> 2
Ready.
UART> W
POWER SUPPLIES ON
UART> (2)
Raw UART input. Space to exit.
2C0077AA4EBF

Now all I have to do is actually find a use for it...
6
Bus Pirate Development / Bug in bbReadWriteByte?
I've been going through the bitbang code trying to figure out why I'm not getting any output (have BP hooked up to a scope) and came across this piece of code:

Code: [Select]
		
}else{//get LSB first
tem=tem<<1;  //shift data output bits
dat=dat>>1;  //shift the data input byte bits
if(di)dat+=0b10000000; //if datapin is HIGH, set MSB
}

My mind feels like mush ATM but am I correct in saying the shift in tem should be the other way round for LSB? Right now a null is shifted in at the LSB position and output in the next stage.

Even if this is a bug it doesn't solve my problem since I'm using MSB First so I'm still searching.
7
Bus Pirate Support / Continious logic analyzer mode?
I'm trying to get the raw logic level outputs on a data line, there's no clock so just raw samples would be fine, the problem is that I need a continuous output even if it's at low speed. I can't use the raw 2 or 3 wire libraries since these need periodic input and the logic analyzer mode only gives you a chunk of data at a time, any ideas how I can accomplish this?
8
General discussion / So what sites do you follow?
I'm a pretty big fan of RSS feeds and use them to keep up to date with a number of sites, what sites do you guys follow? Here's a list of mine:

Hack A Day
http://hackaday.com/feed/

EEVBLOG
http://feeds2.feedburner.com/Electronic ... gVideoBlog

Tinkerlog
http://feeds.feedburner.com/tinkerlog

Your electronics open source
http://feeds.feedburner.com/emcelettronica/en

Embedded projects from around the web
http://www.embedds.com/feed/

Hacked Gadgets - DIY Tech Blog
http://feeds.feedburner.com/hackedgadgets

adafruit industries blog
http://www.adafruit.com/blog/feed/

Circuit Project Electronic
http://www.elecfree.com/electronic/feed/

Circuit Projects
http://www.circuit-projects.com/feed/rss.html

Elektronika.ba
http://feeds2.feedburner.com/Elektronikaba-en

Hack N Mod - Amazingly Cool Hacks, Mods, and DIY Projects
http://hacknmod.com/feed/

Diy Electronics
http://diyelectronics.co.uk/rss.xml

digi-diy All
http://digital-diy.com/component/bca-rs ... ?feed_id=3

Dangerous Prototypes
http://dangerousprototypes.com/feed/

µ[micro]electronics info
http://feeds.feedburner.com/micro-electronics

Let's Make Robots! - Let's Make Robots!
http://letsmakerobots.com/rss.xml

Everyone's Blog Posts - DIY Drones
http://diydrones.com/profiles/blog/feed?xn_auth=no

Electronics-Lab.com Blog
http://www.electronics-lab.com/blog/?feed=rss2

Starlino
http://starlino.com/rss.xml

uC Hobby
http://www.uchobby.com/index.php/feed/

Gadget Gangster Recent Projects
http://www.gadgetgangster.com/scripts/projectsrss.php

CuriousInventor.com Blog
http://feeds.feedburner.com/CuriousInventor_Blog

Tehnik Service
http://feeds2.feedburner.com/Tehnikservicenet

Some of these are rarely active and others have a number of new articles a day, it's easy to spot the popular posts since they normally end up in more than one feed, bus pirate announcements for example.
9
USB Infrared Toy / What the hell happened?
Just got my Irtoy and was a bit disappointing, wonder what's up with seeed, the quality isn't as good as usual. Replacing the IR led I can live with but my resistor values are all wack, R4 for example is 390 Ohm so I'm getting a whopping 7mA through the transmitter. I'm swapping everything out now to get it working.

[EDIT]

Replaced 3 resistors, R2, R4 and R5 and everything works now. This is a pretty big mistake if you ask me, not everyone has a SMD resistor book and hot air station handy.
11
Bus Pirate Support / Circuit insight anyone?
Was bored today so I opened a dongle I had laying around, I've attached a pic and a circuit diagram I drew up for it. It only contains an I2C eeprom and a couple of passives but it's pretty smart, it uses a diode and capacitor to power the eeprom from the eeprom clock line.

Anyway, anyone have an idea what the resistors R1 and R4 are for? I'm assuming PIN1 and PIN2 are connected to Vcc through external resistors and are connected as SDA and SCL for normal I2C operation.
13
Bus Pirate Support / DIY Bus Pirate PCB
I wanted to test out my new setup so I tried to create a home made bus pirate pcb, all in all the results were pretty good, the board came out real well and drilling didn't give me any problems, the small vias tend to be a bit weak so spraying over a protective coating is pretty important.

To do the through hole plating I use small wires if I can afford a bump on the board where I soldered it or fill it with a conductive paint, if using conductive paint you can simply put some sticky tape over the board before drilling to prevent the paint from going anywhere unintended.

I've made some pretty stupid mistakes in the past with my layouts so I prefer making a cheap prototype first, what do you guys prefer, going cheap or doing a professional prototype run?

[EDIT]

Oh, I did a single layer board because I overexposed the first attempt which was double layer, the results are near perfect with double layer since alignment when using photo resist is pretty good.
14
Bus Pirate Support / BP PWM Flaw?
So I was working on a ambient light filter for IR receivers and using the BP PWM mode as a signal generator, turns out the PWM mode won't give a 1% duty cycle, is this a hardware flaw or software setup issue?
15
Bus Pirate Support / Probe cable unboxing.
Ian sent me a probe cable form Seeedstudio for contributing to the bus pirate scripts (thanks Ian!) so I thought I'd post some pics.

The longer cable is one I made myself after I got my first BP, quality isn't all that nice since I simply butchered an old IDE cable and the probes are pretty crappy quality.

What I don't like about the Seeedstudio cable is it's kinda short, this isn't really a problem when working with it but I'd have preferred it a bit longer. The probes are awesome though, it has 8 wire clip on probes and 2 IC clip on probes, would have prefered if all 10 were IC clip on...

To keep the ribbon cable from unraveling I used a glue gun on my cable and cut off the excess which works pretty well, was thinking adding another 10 pin ribbon cable connector is probably a better idea, that way you can plug it directly into a board and it keeps your cable from unraveling.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01712462072session_write_close ( )...(null):0
20.01742593680ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01742594456Database_MySQL->query( ).../DatabaseHandler.php:119
40.06162733208Database_MySQL->error( ).../Db-mysql.class.php:273