gatesphere 45 Posted June 1, 2011 Author Share Posted June 1, 2011 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. Quote Link to post Share on other sites
gordon 229 Posted June 3, 2011 Share Posted June 3, 2011 #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 . Quote Link to post Share on other sites
oPossum 1,083 Posted June 3, 2011 Share Posted June 3, 2011 ; Reverse bit order in R12 mov.b R12, R13 rlc R12 rrc R13 rlc R12 rrc R13 rlc R12 rrc R13 rlc R12 rrc R13 rlc R12 rrc R13 rlc R12 rrc R13 rlc R12 rrc R13 rlc R12 rrc R13 rlc R12 mov.b R12, R12 or R13, R12 swpb R12 Quote Link to post Share on other sites
nuetron 64 Posted June 5, 2011 Share Posted June 5, 2011 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: Quote Link to post Share on other sites
gatesphere 45 Posted June 5, 2011 Author Share Posted June 5, 2011 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! Quote Link to post Share on other sites
nuetron 64 Posted June 5, 2011 Share Posted June 5, 2011 "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. Quote Link to post Share on other sites
bluehash 1,581 Posted June 6, 2011 Share Posted June 6, 2011 I tried to quote what you "quote, quote, quoted", but got this error: "You may embed only 3 quotes within each other." See what I mean?? PS: sorry for hijacking your thread... Bumped to 5 quotes. First time someone has had a need for it. gatesphere and nuetron 2 Quote Link to post Share on other sites
none 7 Posted February 13, 2014 Share Posted February 13, 2014 Thanks for the code in the first post, however, it seems you are using the (weak) high-z state for the clock signal. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.