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?
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...
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'...
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:
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
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...
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.
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:
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 */
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...
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?