Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ATXMega192C3 and fm25c256.lib

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
andrge

Bascom Member



Joined: 26 Oct 2011
Posts: 30
Location: Kaufbeuren

germany.gif
PostPosted: Mon Dec 25, 2023 6:36 pm    Post subject: ATXMega192C3 and fm25c256.lib Reply with quote

Hello,

I would like to use the fm25c256.lib for a project with the ATXMega192C3. Unfortunately I can't get the lib to run.
What is wrong in my code?
Does anyone have a running example?
It looks like no data is being saved. I am using an EEPROM from ST M95256-WMN6TP. I have adjusted the time for saving. The EEPROM needs 5ms.


regards
Andreas
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Sun Jan 07, 2024 11:23 am    Post subject: Reply with quote

you need to use the XMega version : FM24C64_256-XMEGA.lib
_________________
Mark
Back to top
View user's profile Visit poster's website
andrge

Bascom Member



Joined: 26 Oct 2011
Posts: 30
Location: Kaufbeuren

germany.gif
PostPosted: Sat Jan 13, 2024 11:08 am    Post subject: for SPI signals pull upīs necassary? Reply with quote

Hello Marc,

thank you for feedback. This is a good idea. I hadn't noticed that.

Another basic question, do MOSI, MISO and SLC pull-up resistors have to be connected to the SPI lines? I assumed that the lines are comparable to the UART, so no pull up's are required.

I have hardly found any answers to this question on the web.

BR
Andreas
Back to top
View user's profile
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2156

netherlands.gif
PostPosted: Sat Jan 13, 2024 1:25 pm    Post subject: Reply with quote

The spi bus Mosi, Miso slc is driven with push-pull transistors, so no pull are required.
Busses like i2c are using open collector driver and needs pull up resistor.

https://rheingoldheavy.com/spi-basics/

_________________
www.evertdekker.com Bascom code vault
Back to top
View user's profile Visit poster's website
andrge

Bascom Member



Joined: 26 Oct 2011
Posts: 30
Location: Kaufbeuren

germany.gif
PostPosted: Sat Jan 13, 2024 8:45 pm    Post subject: Reply with quote

Hello Evert,

thenak you for your statement. Ihen I have already understood it correctly.
It is the first time that i use SPI for write and read a eeprom.

BR
Andreas
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum