Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to initialize 6805 configuration byte at compile time?

0
Posted

How to initialize 6805 configuration byte at compile time?

0

>I’m using a 68HC705C9A. I must somehow generate at hexcode which writes the registry > at programming time. I’m looking for a instruction like: > > const unsigned char PORTB_MOR @ 0x3ff0 = 0x00; Something like this should do it: #define ___mkstr(x) #x #define __CONFIG(x) asm(“\tpsect config,abs,ovrld”);\ asm(“\torg\t3FF0h”); \ asm(“\tfcb “___mkstr(x)) Then just use __CONFIG(0); or whatever. Just make sure the argument is ok as an assembler expression – you can use #define’d constants because the __mkstr hack makes sure they get expanded.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.