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.

How to interface LTC1292 ADC to 8051 microcontroller

Status
Not open for further replies.

shaha20111

New Member
hello friends does any one knows how to read data from LTC1292 ADC(12bit SPI) sing 8051 microcontroller ?? any one has the C - program for it?? please reply.

Thanks
Regards
Chetan
 
SPI is pretty much the same on all devices.... The basic 8051 hasn't got an SPI module so you'll have to use a software "Bit Banging" type...

I have written routines for I2C... I'll have a look around my libraries to see if I have a set of routines for SPI..
 
All my 8051 has SPI??? which one you using?
 
Silicon labs, but it uses normal 8051 code, GCC and kiel 51 are the main complers I use, most the 8051's seem to have SPI. No idea about intel, isnt 8051 just the core and instruction set? the peripherals are just addons. These are definitely 8051 chips. https://www.silabs.com/support/Pages/ParametricSearch.aspx?searchType=MCUs

to the left it tells you the core is 8051. Who's 8051 is he using? I always thought from reading books that 8051 was a kind of old very limited chip, but seems I was way wrong. I am using a few different ones on that list, all of them in the link have SPI, some have 16 bit ADC etc etc, alot of them are like pics on steroids
 
Anywho!! I have written in the past a software implementation in C for the 8051.... I wrote it to test the 25LC256...

I post it here... Sorry there are no comments... I doidn't need them..... If You cannot understand the code I'll re-write with comments..

You will have to edit the delay function as it wasn't really implemented... I noticed I'm calling delayUs 624 times ( but the variable is only a char )....
 

Attachments

  • SPI.c
    957 bytes · Views: 165
  • spi.h
    427 bytes · Views: 150
  • spiTest.c
    225 bytes · Views: 140
Last edited:
You may have been confusing I2C with SPI LG... There are only a few 51's with SPI... The basic 51 have very little peripherals.

Silicon labs only have 5 derivatives with SPI...
LOL you didnt scroll that link! 5 show then you use the scroll bar on the right, if you look at the number of matches found just above the search results it says 521 matches found for 8051 chips with SPI
is hard to see in this screen shot.
8051.png


They do some incredible chips! The 32 bit range is mind blowing, I am using the Giant Gecko Dev kit amongst others, it has 1 meg of flash on it!! There is demo program with the board and it can talk, just like a normal voice.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top