Re: bit banged Basic52 code for 4-wire serial interface



Largo wrote:

"donald" <Donald@xxxxxxxxxxxxxxxx> wrote in message news:ur2dnXW5u9Bmu-TanZ2dnUVZ_uSgnZ2d@xxxxxxxxxxxxxx

Largo wrote:

"donald" <Donald@xxxxxxxxxxxxxxxx> wrote in message news:p5Odnf4I5K9gyeXanZ2dnUVZ_sKqnZ2d@xxxxxxxxxxxxxx


Largo wrote:


Hi,
Can someone site location or post example code for a MAX6969 LED driver for 8052 project? I have the Max chip for driving LED's prototyping on a 8052 development board. It uses "industry standard" 4-wire serial interface (SPI?). I have BASIC code for a I2C interface.

Largo

Please clairify what you are asking for !

C-code, assembly code, basic code for which basic compiler.

http://www.google.com/search?hl=en&q=8051+i2c

This gives you 152,000 hits, there has to be something in there for you.

Once you know what you want/need.

good luck

donald


Donald'
I have a 8052 development board. So I can use basic52
code for prototyping the MAX6969 circuitry first. Once this is perfected, the prototype will
go over to a PIC micro add on/modification. The PIC code is in assembler. Otherwise, if I use assembly
language for the 8051, how different is this from the PIC 16F873 op code?

If I said to you, can I run PC software on a MAC, what would you say ??

( have you looked at the data sheets for these chips )

Donald,
I meant conceptually as in flow chart.


Do you have a PIC board available ??

I built a PIC ZIF programmer using MPLAB compatable ICD. The one from Olimex.

Why are you trying to develop on basic52, then try to run on a PIC ???

Maybe better to use the PIC programmer then 8051 board.

What development tools for the PIC do you have available ??

A proof of concept is one thing, writting code for two such different processors is just nuts.

Oh, I2C and SPI are also two different animals.

There is tons of examples of software SPI code for PICs all over the net.

There is a hardware SPI port in the 16F873, are you not going to use that?

There is? Okay, 16F873 data*** says Pin 15 is SPI port. And it's already used in this existing circuit.

Now you say so. :-)

The type of questions you were asking and the BASIC52 part made it look like you were a noob.



Again, Google is your friend.

http://www.google.com/search?q=SPI+PIC+code

Is this your first PIC project ??

I did the PIC project from existing assembler code and used the ICD to program. Works okay. Although I wish I could use the existing PIC's SPI port to add the MAX chip added functionality. As noted above, that pins already in use. What do I do now?

Thanks for insight on this. Any more suggestions?
Largo


Ok, using a soft SPI port is a good idea.

Check out the goolge links, I think you will find what your looking for.

Microchip has some app notes about soft SPI as well.
Working assemble code too.

good luck.

donald


.