cancel
Showing results for 
Search instead for 
Did you mean: 

ST7FLITE09-I2C Interfacing help

mailtoarup
Associate II
Posted on September 29, 2004 at 14:32

ST7FLITE09-I2C Interfacing help

3 REPLIES 3
mailtoarup
Associate II
Posted on September 22, 2004 at 09:19

hello,

I am working with ST7FLITE09,which is having no i2c peripheral.so i want use two i/o line PA4 & PA3 as SDA & SCL.Now i have written a software emulated

program(only writting 5 data bytes to eeprom) for that .The compiler i am using is COSMIC(4k version).I am interfacing this micro with a EEPROM.

Previously i have written program in assembly.it is working fine.Now i have written in C.After executing this C program i have verified it with my old assembly program.found that data was not written.I have attached my working folder with .lkf,.mak,.C file............pls tell me where i gone wrong & how can i improve my existing program.any suggestion will be welcome.pls rectify those points and if possible give some C code on that

Another point : How can i make my own .lkf & .mak file.

what are the factors should be included.

Can it be possible to generate .s19 file using only STVD7,as i was unable to find a .s19 using STVD7.then i went for IDEA.pls tell me what should be included for getting .s19/.hex file to work with STVD7.

In st7 application note AN1045 ,i have found that while generating START & STOP condition,they are making a particular bit of PADDR register high or low

will not be PADR instead.may be i wrong.as i feel that i should make data line i.e PADR pin high to low during start and reverse in the case of STOP while keeping PADDR in o/p mode.But application note is making PADDR low and high.

can anyone explain those above points..

Thanks & Regards,

Arup

________________

Attachments :

i2clkf.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzq9&d=%2Fa%2F0X0000000bUF%2FH0nzY.wlIySRk7BxGo30qDvn_ZNxeLCOZjdYSHPxn8c&asPdf=false

i2cmak.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I08N&d=%2Fa%2F0X0000000bUD%2FStlVwfcohcyxCyLbhqanasqcMKwXWPHuRwj4NX4vOcw&asPdf=false

io7FLITE0.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I08q&d=%2Fa%2F0X0000000bUG%2Fr_A6T.9iVDdB3nxvJhuDhTpDl6eWPenKRTMb15D.OMc&asPdf=false

main.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I046&d=%2Fa%2F0X0000000bUE%2FVv7wMZTugGrsTtQLPezCyE6K_LigIOPTPSOa3.uTdLc&asPdf=false

peripheral.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I08g&d=%2Fa%2F0X0000000bUA%2FFwk6Kdgm1tAyKVDvSdaQgjYRuDQdkOGlVZFT4zyMY8A&asPdf=false

variable.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I08b&d=%2Fa%2F0X0000000bUB%2Fl5IEebc6pBS2sdyyAe282PlSw0wJYwF8GJWIJNLBuyM&asPdf=false

variable_def.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I04B&d=%2Fa%2F0X0000000bU9%2FSkT5EtM78DGfX8YfKVQAQVpr1x043M4wiyc7aghKxKU&asPdf=false

variable_ext.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I08R&d=%2Fa%2F0X0000000bU8%2FI7H0uQ3ezK7WZym3GLDG4CBNtfxhh0ZxraeeEjo1gHI&asPdf=false
luca239955_st
Associate III
Posted on September 22, 2004 at 13:32

If you have a working assembler and you are trying to rewrite the same thing in C just compare the output of the compiler with your working assembler to see what's different. Looks like a small program, so it shouldn't be too difficult.

Regards,

Luca

juhee
Associate II
Posted on September 29, 2004 at 14:32

For generating an s19 file in an STVD7 3.0.1 version, you can do the following:

1.Go to Project

2. Then settings

3. In th Pop-Up window, go to Post-Build TAB

4. In the description write ''Running Post-Build step''

In the commans section write following:

chex -o $(OutputPath)$(TargetSName).s19 $(OutputPath)$(TargetSName).st7

For using your own lkf file, you can ub-check the ''auto'' button in

Projects-Settings-Linker window.

Btw there are good application notes avialaible on internet for STVD0 usage

Normally, the method toggling the DDR register of instead of DR is used as it is safer and avoids the use of Read-Modify-Write