Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Prescaler with XMEGA16A4

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

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Fri May 22, 2020 12:52 pm    Post subject: Prescaler with XMEGA16A4 Reply with quote

When Config SPIC or SPID like following, then clk8 is also possible without an error on Compile!

Config Spid = Hard , Master = Yes , Mode = 1 , Clockdiv = Clk8 , Data_order = Msb , Ss = None

The data sheet and 'Help' gives only the possibility of 4/16/64.

So, if there is no error on compilation, what will be the compiled setting?.....
Am I missing something here?

Best regards
Hubert

[b][color=red](BASCOM-AVR version : 2.0.8.2 )[/b][/color]
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Fri May 22, 2020 4:08 pm    Post subject: Re: Prescaler with XMEGA16A4 Reply with quote

hgrueneis wrote:
The ... 'Help' gives only the possibility of 4/16/64.

The help at https://avrhelp.mcselec.com/ tells otherwise.
Quote:
The data sheet ... gives only the possibility of 4/16/64.

XMEGA A MANUAL, rev. 8077I–AVR–11/2012, pages 228/229 give a range from /2 to /128.
Quote:
So, if there is no error on compilation, what will be the compiled setting?.....

The compiled setting will be correct?
Quote:
Am I missing something here?

Maybe CTRL.CLK2X?
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Fri May 22, 2020 4:55 pm    Post subject: Reply with quote

MWS,

thank you for telling me the solution. I might not be as good as you in Bascom, but I have a lot of other hobbies and Bascom is only one of them.
Basically I started with microprocessors in 76 and many programing languages. Even expanding Basic from 4K to 13K and CPM to store four times as much on floppy. I know, old times. Right now I am doing a VTOL aircraft with 7 MCUs. At 70 it might not be all too bad for me.
I have the utmost respect for your expert knowledge, but sometimes you are a bit too aggressive towards people who do not know that much.
Just keep it in mind that not everybody has the same background or knowledge as you do.

Best regards
Hubert
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Fri May 22, 2020 5:25 pm    Post subject: Reply with quote

hgrueneis wrote:
thank you for telling me the solution. I might not be as good as you in Bascom, but I have a lot of other hobbies and Bascom is only one of them.

My reply was not intended to sound like scolding.
Rather I've addressed the single parts of your statement.

But if you write 'I'm not sure whether prescaler xyz, yadayada can be set like that', you trigger a different response compared if you write: 'data sheet tells, help tells'.
The latter is an assertion, while the first is a request.

I did not know the right answer by memory, but I know where to look it up.
For both, request or assertion, I have to look up the help and data sheet, my reply will be different however to an request, as by your assertions you did state something wrong.

If a forum should make only a little sense to provide lasting information and knowledge, my answer must clearly state that your assertions were wrong.
Don't misunderstand that for myself being unkind, in fact as I wrote it, I was as relaxed as could be Very Happy
If you nonetheless feel my replies are rough, then simply pick from them what you can use and ignore the rest.
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Fri May 22, 2020 8:28 pm    Post subject: Reply with quote

MWS,

do not think that I have a grudge against you, I just said, that you might consider that others than you have
much less knowledge of BASCOM than you. I thank you for reminding me of the x2 (not explained in the 'HELP with 4/16/64'). I just think, that a forum like this should not be a 'BLAME GAME' in any way and ...let's be nice to each other.
Just like me. I sometimes have to research code , despite comments I made. Some of the code I have written 10 or more years ago. Then things change and you have to get back into understanding it.
What I am trying to say... Bascom is great, bot not every persons first hobby and so we have different levels of understanding and views.
Just keep that in mind.
Thank you for your help again.

Best regards
Hubert
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Sat May 23, 2020 8:55 am    Post subject: Reply with quote

hgrueneis wrote:
do not think that I have a grudge against you, I just said, that you might consider that others than you have
much less knowledge of BASCOM than you.

I did not think that, even if you'd have one, I'd still decide to reply to your posts.
Quote:
I thank you for reminding me of the x2 (not explained in the 'HELP with 4/16/64').

Do not know how old your help is, but if you would have done like I did suggest to look up the online help, you'd have found below info.
mcselec.com --> BASCOM-AVR Help --> BASCOM Language Reference --> CONFIGURATION --> Config SPIx (for XMegas (with multiple SPI's)), quote:
Quote:
The SPI is clocked by the system clock which is divided by a the SPI divider. If you select a division factor of 4, and the system clock is 4 MHz, then the SPI clock will be 1 MHz.
The possible values are :
CLK2, CLK4, CLK8, CLK16, CLK32, CLK64 and CLK128.
Some modes use the internal CLK2X bit.

If that isn't clear what else would be?

I still can not find your now repeatedly named '4/16/64' in the help, I've found '4|16|64|128' within Config SPI, but then you look up the wrong house number for an XMega.
Quote:
I just think, that a forum like this should not be a 'BLAME GAME' in any way and ...let's be nice to each other.

If pointing out above is called 'blame game', so be it.

And btw., I was nice to you, in any other case my wording would have been very different.

Whether old or young, the same applies: if you make assertions like you did, I have to expect that you did previously look up a current version of help and data sheet.
I won't pack my reply into double cushions, as a) this is not my posting style, never was, and b) otherwise the chance lowers that you do your part properly next time.
Quote:
What I am trying to say... Bascom is great, bot not every persons first hobby and so we have different levels of understanding and views.

Level of understanding does not matter anything, it's not about level, it is about claiming things which are not correct and which are easy to check out in front.
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Sun May 24, 2020 3:56 pm    Post subject: Reply with quote

@MWS,

I am sorry for the lack of research I did. Should have explored a lot more, but time is sometimes limited. No excuse, I know.
Best regards
Hubert
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Sun May 24, 2020 8:45 pm    Post subject: Reply with quote

While I wrote my previous.post, it (quite late) became obvious to me, that you've actually looked up the help's non-XMega SPI, this together with not looking up the data sheet (maybe because the XMega data sheets are really not easy to read), brought you to your initial assertion. Which was your way of asking.

Downloading the data sheet and looking up the online help took less than 5 minutes, and let's not discuss any level of understanding again. Your post took you some time too, first to create and second to wait for replies, so let's not discuss about limited time either.

If you ask next time, I will remember the way you form your questions and you may remember that I take statements literally. Smile
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Sun May 24, 2020 9:44 pm    Post subject: Reply with quote

@MWS,
again , thank you for your expertise and understanding,. I just screwed up...
Maybe senior moment...
Best regards
Hubert
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Mon May 25, 2020 7:13 am    Post subject: Reply with quote

hgrueneis wrote:
Maybe senior moment...

For this argument I still have to wait about ten years, I'm not the freshest salad in the garden either. LOL
You're welcome, no negative sentiments.
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