View previous topic :: View next topic |
Author |
Message |
whung.john Guest
|
ATMEL 93c66 practice |
Posted: Fri Oct 12, 2007 10:45 am |
|
|
hi: cry:
everybody my friends.i try use practice 93c66 chip application.
(my already use ccs libery 9366.c).but i dont know how
to use 2 command. (write_ext_eeprom and read_ext_eeprom),
can u write a sample for me.
thANKS u very much :
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Oct 12, 2007 2:21 pm |
|
|
Quote: |
I dont know how to use 2 command. (write_ext_eeprom and read_ext_eeprom) |
See this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=23824&start=1
It shows a simple test program for the 24LC256. You can also use
it for the 93C66 by changing the #include file to 9366.c. |
|
|
whung.john Guest
|
modify old sample 93c66 |
Posted: Sat Oct 13, 2007 10:24 am |
|
|
hi . pcm programmer.
i try write a program.but 93C66 dont save my send code.
and my lcd panel display "next=ff" .
my code shell be display "next=55. so my code have error area.
can u help me solve question. thanks u very much.
my code follow as:
#include <16F877.h>
#FUSES NOWDT, HS, NOPUT, NOPROTECT, NOBROWNOUT
#use delay(clock=10000000)
#include <LCD>
#include <9366>
unsigned int16 s;
void main()
{
lcd_init();
init_ext_eeprom();
LCD_GOTOXY(1,1); PRINTF(LCD_PUTC,"\f start");
delay_ms(1000);
write_ext_eeprom(1,0x55);
delay_ms(10);
s=read_ext_eeprom(1);
delay_ms(10);
LCD_GOTOXY(1,2); PRINTF(LCD_PUTC,"\f next= %x",s);
while(1);
} |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sat Oct 13, 2007 11:07 am |
|
|
Code: | #include <LCD>
#include <9366> | I'm surprised this does compile. It's better to add the file extensions as well, how else should the compiler know if you want to include the *.h or *.c file? Code: | #include <LCD.c>
#include <9366.c> |
The 9366.c driver from CCS has been there for a long time so we can assume this is working code. Most likely you have a hardware problem. Check the connections from your PIC to 9366:
Code: | PIC 9366
EEPROM_SELECT B7 1
EEPROM_CLK B6 2
EEPROM_DI B5 3
EEPROM_DO B4 4 |
The CCS driver is for the x8 mode of the EEPROM, make sure the ORG line (pin 6) is connected to ground. |
|
|
whung.john Guest
|
hareware dont connection to org |
Posted: Sun Oct 14, 2007 3:58 am |
|
|
my friend ckielstra:
my hareware certainly dont connect org pin.
and i connected the pin.
i modify inclue command.<lcd.c> and <93c66>
.the lcd display show me pratice answear .
thank u very much .my friend ckielstra.
|
|
|
|