circuit_projects

Circuit Projects

Blogger

EEWeb Stats

Circuit's Blog :

Return to Blog

RS232 to SPI Interface Converter

Figure:1

Figure 1 

The project provides the conversion between an RS232 serial interface and an SPI interface which uses the SSP port on a 16F819 device.

It is possible to send any sequence of bytes on the SPI interface from the PIC microcontroller by sending commands on the RS232 interface which refers to waveforms that operate at 5V TTL levels and could destroy the PIC device if it operates at 12V levels but between them, an appropriate converter must be used. The device can be connected directly to an SD/MMC card. For the RS232 to operate at 3.3V instead of 5V, the type of SD/MMC card must be operating at about 3.3V. The SD card and 3.3V RS232 must be disconnected when in-circuit programming operates at 5V.

Out of a number of commands, a complex SPI command cab be built and these simple commands can include enable chip select, write n bytes, read m bytes , and disable chip select. There are also some commands that will initialize, load, or dump an SD/MMC card, in addition to the generic simple commands. The SPI mode of operation is enabled by the initialization of the SD/MMC card.

Tags: RS232, SPI, Converter,

Comments on this post:

By louis scola 0Score: 

2 years ago:  this idea is great especially for those interfaces that are becoming obsolete and without support...thanks for this!

Login or Register to post comments.
 
Click Here