<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://paz00.ru/index.php?action=history&amp;feed=atom&amp;title=Usbasp_spi</id>
	<title>Usbasp spi - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://paz00.ru/index.php?action=history&amp;feed=atom&amp;title=Usbasp_spi"/>
	<link rel="alternate" type="text/html" href="https://paz00.ru/index.php?title=Usbasp_spi&amp;action=history"/>
	<updated>2026-06-16T18:58:09Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://paz00.ru/index.php?title=Usbasp_spi&amp;diff=970&amp;oldid=prev</id>
		<title>Stuw: Новая страница: «===Intro=== USBASP [http://www.fischl.de/usbasp/] is a Atmega8/Atmega48 based USB to ISP programmer. It can be picked up from Aliexpress for about $1.5 [http://ru…»</title>
		<link rel="alternate" type="text/html" href="https://paz00.ru/index.php?title=Usbasp_spi&amp;diff=970&amp;oldid=prev"/>
		<updated>2016-01-18T07:07:32Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «===Intro=== USBASP [http://www.fischl.de/usbasp/] is a Atmega8/Atmega48 based USB to ISP programmer. It can be picked up from Aliexpress for about $1.5 [http://ru…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Intro===&lt;br /&gt;
USBASP [http://www.fischl.de/usbasp/] is a Atmega8/Atmega48 based USB to ISP programmer. It can be picked up from Aliexpress for about $1.5 [http://ru.aliexpress.com/af/usbasp.html].&lt;br /&gt;
&lt;br /&gt;
It is possible to use the USBASP (firmware update is likely needed) to interact with SPI devices.&lt;br /&gt;
&lt;br /&gt;
I implemented a library for the USBASP using libusb. I used the new library with the raspberry pi 2 based software for communication with my device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===USBASP===&lt;br /&gt;
libusb can be used to control USBASP stick. USB bulk transfer is used. All commands supported by the USBASP can be found in the USBASP firmware sources.&lt;br /&gt;
&lt;br /&gt;
USBASP have TRANSMIT command. This command sends 4 bytes of data on SPI bus. Also USBASP pushes SS pin low (active) during &lt;br /&gt;
initialization and keeps it in this state before disconnect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===MFRC522===&lt;br /&gt;
I have a device based on MFRC522 chip that can be connected to an SPI bus. &lt;br /&gt;
Protocol is simple: 2 bytes command to read ow write registers. Description can be found in the datasheet (it is free and easy to find).&lt;br /&gt;
&lt;br /&gt;
I failed to get it working with my device as is and I had to modify firmware. Modification is simiple. I added a new command (I called it TRANSMIT2) to transmit data in the format MFRC522 understands. The command controls SS pin and sends only two bytes of data.&lt;br /&gt;
&lt;br /&gt;
'''After update I lost ability to program Atmega chips for some reason. Initial firmware had no ability to set SPI clock, while updated firmware has. Maybe this is a reason. I didn't figure it out.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I implemented usbasp library. This library have interface that compatible with the bcm2835 library (library for SPI communication on the raspberry pi 2).&lt;br /&gt;
Then I took rpi-rc522 software (based on bcm2835 library) and modified it to utilize my usbasp library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Links===&lt;br /&gt;
TODO: add links to the software.&lt;/div&gt;</summary>
		<author><name>Stuw</name></author>
	</entry>
</feed>