Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
There is a problem in function convert:
The conversion from BCD to asc
g = 30 | d1;
Shuld be
g = 0x30 | d1;
The value 0x30 is the ASCII code of the character '0' (zero) [May be written as '0' but not as 30]
Maybe the problem is related to timing.
In your code you placed a delay(1) while en is high and no delay while it is low.
Actually the display needs at least 2 milisec while it is low. To admit data the active high pulse of en may be very short.
Indeed you may use GPIO to make a spi interface. The problem is that if you don't use hardware support it will be a bit slower and will keep the processor busy. The microcontroler will have to control all signals as GPIO (CE, SCL, and MOSI and read MISO).
I have written a program to read/write a smartcard with LPC2378(similar to 24C16). See
**broken link removed**
I noticed that i had a problem writing in a burst across 8 byte page boundaries (no problem reading).
I think the device needs some time.
I suggest to change your code to automatically...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.