Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

SPI to UART challenge

Status
Not open for further replies.

ikalogic

Member
hello, i am trying to figure out a way to build a way of communicating with a and SPI enabled slave device using the RS232 port.

For now i am just asking a simple question.. with all the experience you've got guys.. can you guess if it is doable at all?

IMPORTANT NOTE: I don't want to use a micro controller for the conversion.. there is a reason for that!
 
blueroomelectronics said:
MAX3110E is a RS232 to SPI IC.
That chip won't do what the OP requested. Don't waste yor time trying to figure out how to make it work. I fear your quest is hopeless.
 
NXP under Interface->Bridges has some ICs that behave as a UART slave and an I2C master and other ones that behave as an I2C slave and a SPI master. If you chained two together you could communicate to a SPI slave using a UART master. BUt I don't know of a single chip that does it all in one.

Another way is you could bit blast maybe using a the GPIO on a UART-slave/I2C-Master IC.
 
Last edited:
ikalogic: Doable Yes.
I used Parallel port back before my microcontroller days to communicate with SPI and microwire. I see no reason RS232 cannot be implemented.

Is the RS232 from a PC using +-12v levels or from a controlling device using 0-5v levels? Well either way you need to control the outputs TX, RTS, and DTR to emulate the outputs CS, CLK, and DIN. Next control CTS or any other input control lines to emulate DOUT.

?TX? You may be questioning how can TX be used as a control (HI/LO) line when its a dedicated NRZ data line. Haha, there in lies the true challenge. I will not spill the beans on that one. Ever so much more victorious the feeling to solve that challenge own your own in place of being instructed how.

Here is a hint I feel more than suffices. How do you keep a rapidly toggling signal uninhibited at one end and steady DC on the other end? Now once you add additional chips what difference does it make if a micro is used or not. Best to prevent then to patch with glue... logic.
 
ikalogic said:
hello, i am trying to figure out a way to build a way of communicating with a and SPI enabled slave device using the RS232 port.

For now i am just asking a simple question.. with all the experience you've got guys.. can you guess if it is doable at all?

IMPORTANT NOTE: I don't want to use a micro controller for the conversion.. there is a reason for that!

In many respects a PIC programmer is similar to an SPI device, so you could use similar techniques to the JDM type 'serial' programmers - but you're making it hard work by not using a simple PIC to do the job.
 
okay thanks for the help..

Nigel, i know it is harder, but i want to build an SPI programmer that can be build by people that don't already have a programmer! ;)

i already know how to do it with a pre-programmed uC..
 
  • Like
Reactions: 3v0
ikalogic said:
okay thanks for the help..

Nigel, i know it is harder, but i want to build an SPI programmer that can be build by people that don't already have a programmer! ;)

So why didn't you ask that in the first place?, it bears no resemblance to your original question.
 
Nigel Goodwin said:
So why didn't you ask that in the first place?, it bears no resemblance to your original question.

Most messages would benefit if the OP only stated their application in the first place.
 
Papabravo said:
That chip won't do what the OP requested. Don't waste yor time trying to figure out how to make it work. I fear your quest is hopeless.
Let me clarify my earlier remark. It is easy to do with a microcontroller. Having a UART and an SPI port in the hardware would make the job fairly easy. Having to do one or both in software would be moderately challenging, but not overly difficult. Any "chip" you found that would satify your requirements would probably be a preprogrammed microcontroller in any case.
 
Last edited:
Nigel Goodwin said:
So why didn't you ask that in the first place?, it bears no resemblance to your original question.

I was just trying to concentrate on the main point of SPI to UART, if i started speaking about programmers.. i was quite sure the discussion would diverge somewhere far from what i needed.
 
blueroomelectronics said:
Sounds like you're building an AVR programmer, I would think there are plenty of designs on the net.

I've found none that does serial programming through SPI, without passing through another uC.. did you?
 
ikalogic said:
I was just trying to concentrate on the main point of SPI to UART, if i started speaking about programmers.. i was quite sure the discussion would diverge somewhere far from what i needed.

So you still haven't told us what you want? - you might get much better answers if you do?.
 
Papabravo said:
Let me clarify my earlier remark. It is easy to with a microcontroller. Having a UART and an SPI port in the hardware would make the job fairly easy. Having to do one or both in software would be moderately challenging, but not overly difficult. Any "chip" you found that would satify your requirements would probably be a preprogrammed microcontroller in any case.

sounds quite realistic... i'll give it some thinking this weekend.. and I'll tell you if i come up with something..
 
Nigel Goodwin said:
So you still haven't told us what you want? - you might get much better answers if you do?.

I want to build an ISP programmer that attaches to the serial port of a PC.

I have already made a parallel programmer here:

**broken link removed**

But Parallel port is disapearing, slowly but surely, so i want to find a long term solution, either USB or SERIAL. I am able to build any required program (under WINDOWS)

I thought i would start by putting my first target on the SERIAL port (since there exist many USB to serial adapters out there..)


soo.. here is where i stand!
 
RS232 is disappearing off PCs too. USB to RS232 is iffy at best as the timing can be way off. The AVRs have the Dragon what's wrong with using that?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top