Find help, specifications and source code for the LPC900. The LPC900 challenges Microchip and AVR based on the worlds most popular 8-bit architecture the 80C51. With a 2-clock core the LPC900 series is a high performance, very flexible and low cost 8-bit microcontroller family. Designers using or interested in these devices are encouraged to share their know-how and ask questions.
(unknown) - timos timos - Jul 28 2:28:59 2008
Hello folks,
Anyone of you ever tried to succesfully "talk" to an SPI device like a flash memory or a
RTC(?) I tried Code architect but in vain :(
Plz any code in "C" will be appreciated
Thanks
Timothy
------------------------------------

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )
Re: (unknown) - Min - Jul 28 2:49:47 2008
Hello Timothy,
I made a project with LPC932. I code the simulating SPI to "talk" to a
digital temperature sensor. It means that you should write the driver code
to simulate the SPI.
Best Regards,
*Min*
2008/7/28 timos timos
> Hello folks,
>
> Anyone of you ever tried to succesfully "talk" to an SPI device like a
> flash memory or a RTC(?) I tried Code architect but in vain :(
>
> Plz any code in "C" will be appreciated
>
> Thanks
> Timothy
>
>
>

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )Re: (unknown) - timos timos - Jul 28 5:07:33 2008
Hello Min,
Thanks for the reply. I wrote a software SPI comunication routine in C using he Keil
simulator , all ok , but it seems that the core is too slow for my application. I am higly
in need to do this using the hardware on chip module SPI. But even with all the
combinations of bits in the SPCTL register no signals appear on scope (real bench) neither
at the simulator :(
It takes about 40us to send 4 bytes in SPI software enulation :(( The SPI device i am
tryingto talk ot is an Atmel Data Flash 8Mbit
Any suggestions are welcome
Thanks
Project: " Analog voice storage in a data flash using an 89LPC936 "

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )
AW: (unknown) - ast66 - Jul 29 14:53:07 2008
Hello Timothy,
attached you find extracts from a project I worked on 2 years ago. Because
of copyright I can not send the whole project. But the files includes
everything that was needed for clock/data output on the SPI.
I made a controller board with a 89LPC936 to control XXL matrix lcd modules.
The lcd interface was a simple clock/data interface to feed multiple shift
registers. The controller was clocked by a 11.0592 MHz crystal and the SPI
worked fine with 691200 baud.
Regards,
Armin
-----Ursprungliche Nachricht-----
Von: l...@yahoogroups.com [mailto:l...@yahoogroups.com]Im
Auftrag von timos timos
Gesendet: Montag, 28. Juli 2008 11:07
An: l...@yahoogroups.com
Betreff: Re: [lpc900_users] (unknown)
Hello Min,
Thanks for the reply. I wrote a software SPI comunication routine in C using
he Keil simulator , all ok , but it seems that the core is too slow for my
application. I am higly in need to do this using the hardware on chip module
SPI. But even with all the combinations of bits in the SPCTL register no
signals appear on scope (real bench) neither at the simulator :(
It takes about 40us to send 4 bytes in SPI software enulation :(( The SPI
device i am tryingto talk ot is an Atmel Data Flash 8Mbit
Any suggestions are welcome
Thanks
Project: " Analog voice storage in a data flash using an 89LPC936 "
------------------------------------

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )
Re: (unknown) - timos_t - Jul 29 17:17:30 2008
Armin,
Thank you very much for your responce :))) But i cant download the
.zip file , cause it says (not stored) and i cant download it - it
does not hand and lik me to do this :(( Any ideas (?)
Thanks a lot in advance
Timothy
------------------------------------

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )
Re: Re: (unknown) - Alvin Schmitt - Jul 29 21:26:22 2008
Try downloading it using mozilla FireFox (info can be found at:
http://www.mozilla.com/en-US/about/whatismozilla.html . Use FireFox instead of Internet
Explorer to down load the zip file. The download file for FireFox can be found at:
http://www.mozilla.com/en-US/products/firefox/ . If you can not click on the above then
enter them into the IE address line. Alvin
timos_t
wrote:
Armin,
Thank you very much for your responce :))) But i cant download the
.zip file , cause it says (not stored) and i cant download it - it
does not hand and lik me to do this :(( Any ideas (?)
Thanks a lot in advance
Timothy
APSTRON
P.O. Box 10336
Blacksburg VA 24060-1442
www.blacksburg.net/~schmitta

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )Re: Re: (unknown) - ast66 - Jul 30 2:07:44 2008
Hello Timothy,
below I have pasted the 3 files, which was included in the zip file.
The identifier not defined in P936lib.h come from Reg936.h, the Keil
header file for 89LPC936.
Regards,
Armin
****** main.c ******
#include
// P89LPC936 SFR-Constants
#include
void main(void)
{
// initialisation
spi_init( SPI_SSIGNORE | SPI_ENABLE | SPI_MASTER | SPI_CLK_PHASE |
SPI_RATE16);
// pseudo code
while( BytesInBuffer--) {
write_spi( *Buffer++);
}
}
****** spi.c ******
#include "P936lib.h"
// --------------------------------------------------------
// Initialising SPI (Serial Peripheral Interface)
// --------------------------------------------------------
void spi_init( unsigned char ctl)
{
SPCTL = ctl;
}
// --------------------------------------------------------
// send one byte on SPI
// --------------------------------------------------------
void write_spi( unsigned char c)
{
SPSTAT = 0;
SPDAT = c;
while( SPSTAT < 0x40);
SPSTAT = 0xC0;
}
****** P936lib.h ******
// constants for Serial-Peripheral-Interface
#define SPI_SSIGNORE 0x80 // SS-Ignore -> pin 2.4 portfunction
#define SPI_ENABLE 0x40 // SPI-Enable
#define SPI_LSBFIRST 0x20 // LSB first
#define SPI_MSBFIRST 0x00 // MSB first
#define SPI_MASTER 0x10 // Master
#define SPI_CPOL_NEG 0x08 // high if idle; leading edge 1>0;
trailing edge 0>1
#define SPI_CPOL_POS 0x00 // low if idle; leading edge 0>1;
trailing edge 1>0
#define SPI_CLK_PHASE 0x04 // data write on LE, data valid on TE
#define SPI_RATE128 0x03 // CCLK / 128 -> 11059200/128 -> 86400 baud
#define SPI_RATE64 0x02 // CCLK / 64 -> 11059200/64 -> 172800 baud
#define SPI_RATE16 0x01 // CCLK / 16 -> 11059200/16 -> 691200 baud
#define SPI_RATE4 0x00 // CCLK / 4 -> 11059200/4 -> 2764800 baud
// declaration for spi.c
void spi_init( unsigned char ctl);
void write_spi( unsigned char c);
****** the end ******
Zitat von timos_t :
>
> Armin,
>
> Thank you very much for your responce :))) But i cant download the
> .zip file , cause it says (not stored) and i cant download it - it
> does not hand and lik me to do this :(( Any ideas (?)
>
> Thanks a lot in advance
> Timothy
> ------------------------------------

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )