Skip to main content

Messages

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

Messages - anton.todorov

16
Bus Pirate Support / Binary mode - write-then-read
Hi,
I am trying to read 2MB SPI EEPROM in binary mode and could not manage to use write-then-read function. There is something i don't understand:
Quote
1. First send the write then read command (00000100)
2. The next two bytes (High8/Low8) set the number of bytes to write (0 to 4096)
3. The next two bytes (h/l) set the number of bytes to read (0 to 4096)
above is clear but next:
Quote
4. If the number of bytes to read or write are out of bounds, the Bus Pirate will return 0x00 now
Else if the number of bytes are in the bounds, does BP return something, or do nothing?

Quote
HiZ>i
Bus Pirate v3a
Firmware v5.10 (r559)  Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com
17
Bus Pirate Support / Re: SPI Gibberish
IMHO you swapped data pins('master' is the buspirate side):
MISO - Master In Slave Out, should be connected to SDO
MOSI - Master Out Slave In, should be connected to SDI

So swap data lines and check what you will see...
and as beginner, first try to communicate buspirate with eeprom chip to feel the protocol better...
18
USB Infrared Toy / Re: IR Toy transmit problems
Ian,
is it possible to append or print separately the SVN changeset the given exe is compiled, or a (web/wiki)page or file with md5sums of the file and svn changeset? I am asking because I do not have problems with IrToy V2 upgraded and using tools from 'IRToy Package v2.0.zip'...
19
USB Infrared Toy / Re: IRToyRecPlay v0.7 question
With my IrToy v2  I do not see any problems with it on W7 - 64bit. Can you check the .bin files with hex editor? It should end with 0xff 0xff bytes. I see you are trying to replay incomplete(?) .bin file (I can't see 0xff 0xff at the end replay)
(irtoy upgraded with firmware from 'IRToy Package v2.0.zip')
Here is the content of my Midea_START.bat:
Code: [Select]
irtoy -d COM3 -p -f Midea_HSWING.bin -v -b 512
the file was recorded with same command, just -r appended at the end.
Here is the result:
Quote
D:IRtoy>Midea_START.bat
-------------------------------------------------------------------------

 IR TOY Recorder/Player utility v0.81 (CC-0)
 http://dangerousprototypes.com

-------------------------------------------------------------------------
 Opening IR Toy on COM3 at 115200bps...
 IR Toy Firmware version: V212
 Entering IR sample mode ....  Done.
 IR Toy Protocol version: S01
 Current sample timer Resolution: 21.3333us
 Entering Player Mode
Playing single file Midea_START.bin
 Press a key to start playing Midea_START.bin or X to exit
 Sending 400 Bytes to IRToy...
 00  C9  00  D1  00  16  00  4D  00  16  00  1C  00  16  00  4D  00  16  00  4E
 00  16  00  1B  00  16  00  1C  00  16  00  4D  00  16  00  1C  00  16  00  1B
 00  16  00  4D  00  18  00  1B  00  16  00  1C  00  16  00  4D  00  16  00  4E
 00  16  00  1B  00  16  00  4E  00  16  00  4C  00  17  00  1C  00  16  00  4D
 00  16  00  4E  00  16  00  4E  00  16  00  4D  00  16  00  4E  00  16  00  4D
 00  16  00  1C  00  16  00  4D  00  16  00  1C  00  16  00  1B  00  16  00  1C
 00  16  00  1B  00  16  00  1C  00  16  00  1B  00  16  00  1C  00  16  00  4D
 00  16  00  4E  00  16  00  4D  00  16  00  1C  00  16  00  1B  00  16  00  1C
 00  16  00  1B  00  16  00  4E  00  16  00  1B  00  16  00  1C  00  16  00  1B
 00  16  00  4D  00  17  00  4C  00  17  00  4E  00  16  00  4D  00  16  00  F5
 00  CA  00  D1  00  16  00  4D  00  16  00  1C  00  16  00  4D  00  16  00  4E
 00  16  00  1B  00  16  00  1C  00  16  00  4D  00  16  00  1C  00  16  00  1B
 00  16  00  4E  00  16  00  1B  00  16  00  1C  00  16  00  4D  00  16  00  4E
 00  16  00  1B  00  16  00  4E  00  16  00  4E  00  16  00  1B  00  16  00  4E
 00  17  00  4D  00  16  00  4E  00  16  00  4D  00  16  00  4E  00  16  00  4E
 00  16  00  1B  00  16  00  4E  00  17  00  1B  00  16  00  1C  00  16  00  1B
 00  16  00  1B  00  16  00  1C  00  16  00  1B  00  16  00  1C  00  16  00  4D
 00  16  00  4E  00  16  00  4E  00  16  00  1A  00  17  00  1B  00  16  00  1C
 00  16  00  1A  00  17  00  4D  00  18  00  1B  00  16  00  1C  00  16  00  1B
 00  17  00  4D  00  18  00  4C  00  18  00  4D  00  18  00  4E  00  17  FF  FF

 checking comresult.... ok
 End of file reached: Midea_START.bin

 Thank you for playing with the IRToy version: v0.81.
Just for the record, the driver is set to 9600 8N1 in computer management... the IRTOYRECPLAY is changing the speed to 115200,

AFAIK it is IR code is 48-NEC2, two times repeated. (will try to write decoding script...)
20
Bus Pirate Support / Re: Raw SPI Mode Help
Hi akuma6099,
to read 4 bytes from address 0x100:
first you must send READ command (0x3h)and the starting address (3 bytes), then we must drive clock to read 4 bytes:
so the bulk command will have 8 bytes, but the bulk command is counting from 0, so we send
Code: [Select]
0x17 0x03 0x00 0x01 0x00 0x00 0x00 0x00 0x00
take care for wast 4 bytes that are received they are the returned data.

to write 1 byte @ 0x200. lets write the byte 0xA5
first you must enable writing in the status register:
send
Code: [Select]
0x10 0x06
(you should drive CS pin too)
then send PP command and the address then the databytes:
Code: [Select]
0x14 0x02 0x00 0x02 0x00 0xa5

I am attaching my ugly perl scripts that I use to write serial SPI flash chips. It needs some polishing before release, i reworked it because I was using obsolete BP commands, but it is working for me...

BR,
Anton
21
General discussion / PCB design software
In other thread there is discussion about PCB software, their best and worst sides etc. But main topic is about a KiCAD tutorial.

I suggest to leave the other topic and  move the flames here.

Lets first figure out what we have on the shelves:

gEDA
Price: free GPL
OS: Linux, MacOS X

KiCAD
Price: free GPL
OS: Linux, MacOS X, Windows

DesignSpark PCB
Price: free
OS: Windows

Eagle
Price: (free or $49) to $1494
OS: Linux, MacOS X, Windows

NI Multisim
Price: educational to ~$2600
OS: Windows

Target3001
Prices: free to ~3000EUR
OS: Windows

Proteus
Price: 200EUR to 4545EUR
OS: Windows, other?

Altium Designer
Price: ~$5000
OS: Windows, other?

Spice simulation:
LTspice
Price: Free
OS: Windows

At the moment I use freeware version of Eagle, but will try some projects with Target3001( and its integration with PCBfab service). I have KiCAD installed but no projects with it.

What/Why/ PCB software you use?

Best regards,
Anton

edit:
added DesignSpark PCB 10x brain
added NI Multisim 10x arhi
added LTspice
23
Bus Pirate Support / Re: 24AA I2C EEPROM Bus Pirate Demo
it looks like something is misunderstood. refering  this document http://ww1.microchip.com/downloads/en/D ... 21178E.pdf

furst you type the i2c address of the device and the command. according to page5 the address of this chip is 0b1010xxxy where xxx doesn't matter, read command is y=1, write command is y=0. next byte is the memory cell address, then is the data. If writing - the data is the data to write, if reading there is no data byte(there is only a clock on the bus to carry the return data). So you have:
[ => start transfer condition
0xa2 = 0b1010xxx0 => WRITE condition
0x00 => address cell 0x00
] => end transfer
next you write in the same cell:
[0xa2] = 0b1010xxx0 => WRITE condition.

to change memory cells tweak the second byte:
[0xa0 0x00 0x11] - this will write 0x11 at address 0x00
[0xa0 0x01 0x22] - this will write 0x22 at address 0x01

to read cell 0x01 first write the pointer to it then read it:
Code: [Select]
[ 0xa0 0x01 [ 0xa1 r ]

it is possible to read many bytes starting from address (for example 3 bytes starting from address 0x02):
Code: [Select]
[ 0xa0 0x02 [ 0xa1 r:3 ]
25
Open Bench Logic Sniffer / Re: Test Release 3.06 - Demon Core
Is the CDC-232 driver missing in this release?
Or is it not needed any more?

On fresh Vista after plugging OBLS it is searching for "Logic Sniffer CDC-232" driver.
The driver from "OpenBench_LogicSniffer_2.1/inf" fail too:
Quote
The drivers for this device are not installed. (Code 28)

There is no driver selected for the device information set or element.
26
General discussion / Re: Forum migration
About RSS feeds, I am using RSS subscription extension for Chrome. It is giving me:
http://http://dangerousprototypes.com/forum/feed.php
http://http://dangerousprototypes.com/forum/feed.php?mode=news
http://http://dangerousprototypes.com/forum/feed.php?mode=topics
http://http://dangerousprototypes.com/forum/feed.php?mode=topics_active

for subsection:
http://http://dangerousprototypes.com/forum/feed.php?f=4 is RSS feed of Bus Pirate Support
28
USB Infrared Toy / Re: New firmware features (now v10)
I would like to clarify about the prescaler it is 4 or 7(21.3333)? Or we are talking for different 'prescaler' definitions?
..../IRs.c:
Code: [Select]
128  /*
129 * PWM registers configuration
130 * Fosc = 48000000 Hz
131 * Fpwm = 37974.68 Hz (Requested : 38000 Hz)
132 * Duty Cycle = 50 %
133 * Resolution is 10 bits
134 * Prescaler is 4
135 * Ensure that your PWM pin is configured as digital output
136 * see more details on http://www.micro-examples.com/
137 * this source code is provided 'as is',
138 * use it at your own risks
139 */
29
USB Infrared Toy / Re: Prescaler setup in sampling mode
I have only basic knowledge of Python so i can't help here. I will add writing .sla files soon and maybe will use them for the decoder scripts because the data is in useconds so it is pre-scaler independent. The raw bin files carry only the counters so the pre-scaler multiplier to get useconds is missing.

Another missing function I am thinking about is protocol detector - to parse the data and say how close it is to each known protocol...
30
USB Infrared Toy / Re: Prescaler setup in sampling mode
Hi Ian,
With posted v10 fw my IRToy have behaviour as expected.  Now I will tweak the reader script to implement prescaler change. Just to add function for sending multiple bytes. And next is irtoy sender script... Or this function will double your native native C utility?

BR,
Anton

( ! ) 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.01872457424session_write_close ( )...(null):0
20.01912589040ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01912589816Database_MySQL->query( ).../DatabaseHandler.php:119
40.06512728576Database_MySQL->error( ).../Db-mysql.class.php:273