Jump to content
43oh

Quick and dirty 74HC595 shift register demo


Recommended Posts

Hi gatesphere,

 

I am using Embedded Workbench 6.0 Kickstart. When I compile your MSPhere 74HC595 shift register demo, I get this error:

Error[e46]: Undefined external "main" referred in ?cstart ( C:\Program Files\IAR Systems\Embedded Workbench 6.0 Kickstart\430\LIB\CLIB\cl430f.r43 )

 

Do you know what's wrong?

I'm not sure what's going on there, other than perhaps you don't have the correct runtime library defined? Check out what it says in the project's properties.

 

I'd help you more, but I don't have IAR installed at the moment. :(

Link to post
Share on other sites
#ifdef MSBFIRST // reverse order of the bits
 for (i = 0; i < 8; i++) {
   temp = (0x01 & data);
   data = data >> 1;
   temp2 = (temp2 << 1) + temp;
 }
 data = temp2;
#endif

Also see Bit Twiddling Hacks for nice alternatives.

 

data = (char)(((data * 0x0802LU & 0x22110LU) | (data * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16)

will be a bit easier on the CPU :).

Link to post
Share on other sites
Hi gatesphere,

 

I am using Embedded Workbench 6.0 Kickstart. When I compile your MSPhere 74HC595 shift register demo, I get this error:

Error[e46]: Undefined external "main" referred in ?cstart ( C:\Program Files\IAR Systems\Embedded Workbench 6.0 Kickstart\430\LIB\CLIB\cl430f.r43 )

 

Do you know what's wrong?

I'm not sure what's going on there, other than perhaps you don't have the correct runtime library defined? Check out what it says in the project's properties.

 

I'd help you more, but I don't have IAR installed at the moment. :(

Silly me, I didn't have a 'main()' in the code, sorry for blundering and creating confusion... :oops:

Link to post
Share on other sites
Hi gatesphere,

 

I am using Embedded Workbench 6.0 Kickstart. When I compile your MSPhere 74HC595 shift register demo, I get this error:

Error[e46]: Undefined external "main" referred in ?cstart ( C:\Program Files\IAR Systems\Embedded Workbench 6.0 Kickstart\430\LIB\CLIB\cl430f.r43 )

 

Do you know what's wrong?

I'm not sure what's going on there, other than perhaps you don't have the correct runtime library defined? Check out what it says in the project's properties.

 

I'd help you more, but I don't have IAR installed at the moment. :(

Silly me, I didn't have a 'main()' in the code, sorry for blundering and creating confusion... :oops:

Hahahaha... looks like your signature strikes again!

Link to post
Share on other sites
"quote="nuetron"]Hi gatesphere,

 

I am using Embedded Workbench 6.0 Kickstart. When I compile your MSPhere 74HC595 shift register demo, I get this error:

Error[e46]: Undefined external "main" referred in ?cstart ( C:\Program Files\IAR Systems\Embedded Workbench 6.0 Kickstart\430\LIB\CLIB\cl430f.r43 )

 

Do you know what's wrong?[/quote"

I'm not sure what's going on there, other than perhaps you don't have the correct runtime library defined? Check out what it says in the project's properties.

 

I'd help you more, but I don't have IAR installed at the moment.

Link to post
Share on other sites
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...