"STM32. Net MF Development Board Learning-10" SPI test touch screen coordinate acquisition

Source: Internet
Author: User
Tags touch

STM32F103XX CORTEX-M3 series of chips containing three-way SPI channel, Red Bull Development Board used two roads, SPI1 connection at45db161b model SPI flash,spi2 connection ADS7843 touch screen signal processing chip, SPI3 is best not to use, Because there is a conflict with the JTAG pin, there will be problems in debugging. The em-stm3210e Development Board, which does not contain a touch screen, uses only the same way to connect SPI Flash. This article describes touch screen coordinates acquisition, so only users with Red Bull Development Board can test.

First of all, a brief introduction of SPI-related knowledge, SPI is the English serial Peripheral interface abbreviation, as the name implies is the serial peripheral device interface. was first defined by Motorola on its Mc68hcxx series processor. SPI interface is mainly used in Eeprom,flash, real-time clock, ad converter, and digital signal processor and digital decoder, is a high-speed, Full-duplex, synchronous communication bus.

SPI's communication principle is simple, it works in a master-slave mode, which usually has a master device and one or more from the device, requires at least 4 lines, in fact, 3 can also (for one-way transmission, that is, Half-duplex mode), the relevant pin meaning is as follows:

(1) sdo– The main equipment data output, from the equipment data input

(2) sdi– The main equipment data input, from the equipment data output

(3) sclk– clock signal, generated by the main equipment

(4) cs– from the equipment to enable the signal, controlled by the main equipment

(For more information, please see Baidu Encyclopedia SPI Entry: http://baike.baidu.com/view/245026.htm)

Again, ADS7843 chip knowledge, the Red Bull Development Board on this chip schematic diagram is as follows:

It is a pity that the interrupt pin (INT) is not drawn from the schematic diagram, so the x,y coordinates can only be obtained by polling.

ADS7843 chip SPI Communication sequence diagram is as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.