Jump to content
43oh

rebeltaz

Members
  • Content Count

    158
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by rebeltaz

  1. I think I got three of these 74c922 ICs on eBay not too long ago for under $10 including shipping for all three. Looking back, probably not necessary, but I enjoyed working with them and getting it all working
  2. I can use level-shifting - it was just an added part count - either two resistors for each line (for a total of twelve resistors) or a max232 level shift on each line (for a total of 3 dual shift ICs), but I have found that in this particular case, that wasn't necessary. As for your second point... yeah, that thought occurred to me after I had already designed this. I'm not sure why it didn't dawn on me that I was using six lines for the encoder IC when using the keypad matrix by itself would have only added one addition line. I guess that comes from having way too many junkbox parts layin
  3. Oh, cool... All three tunes overran the 2553's memory as well, but I did the const trick and I was able to fit it all on the 2452. Thanks, dude!
  4. Thanks to my trusty "Teach Yourself C for Linux" book I figured this out, in case anyone else has this problem and needs to do this: const unsigned int OdeToJoy[][2] = {note, duration, note, duration, ... , 0, 0} const unsigned int FuneralMarch[][2] = {note, duration, note, duration, ... , 0, 0} const unsigned int (*tune)[2]; void main(void) //snipped// if (DISABLED) PlayMusic(DISABLED); else PlayMusic(ENABLED); //snipped// void PlayMusic(unsigned int status) { switch (status) { case (DISABLED): { tune = FuneralMarch; break; } case (ENABLED): { tune = OdeToJoy; break;
  5. OK... I can see that. So the only way to do this is to use three separate arrays and three loops, like this: //initialize array for "Ode To Joy" const unsigned int OdeToJoy[][2] = { e, quarter, e, quarter, f, quarter, g, quarter, g, quarter, f, quarter, e, quarter, d, quarter, c, quarter, c, quarter, d, quarter, e, quarter, e, dquarter, d, eighth, d, half, e, quarter, e, quarter, f, quarter, g, quarter, g, quarter, f, quarter, e, quarter, d, quarter, c, quarter, c, quarter, d, quarter, e, quarter, d, dquarter, c, eighth, c, half, d, quarter, d, quart
  6. In my project, I would like to be able to play one of three different tunes based on a condition. Rather than initialize three separate <=100x2 global arrays and then having three identical loops to play the correct notes, I am trying to do this: void PlayMusic(unsigned int status) { delay_ms(500); switch (status) { case (DISABLED): //initialize array for "Ode To Joy" const unsigned int tune[][2] = { e, quarter, e, quarter, f, quarter, g, quarter, g, quarter, f, quarter, e, quarter, d, quarter, c, quarter, c, quarter, d, quarter, e, quarter, e, dquar
  7. Wow! Talk about in-depth! I actually have gone over the Basic Clock Module section of that document and only became more confused... I think understand now, or at least if not, I can study your explanation further and figure it out. I really do appreciate the help.
  8. Can someone explain to me, in simple language, the difference in the various clocks (MCLK, SMCLK, ACLK, etc.) and when they're used, how to know which to use... Also, I am using this code in my program: void ConfigClocks(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer if (CALBC1_1MHZ ==0xFF || CALDCO_1MHZ == 0xFF) FaultRoutine(); // If calibration data is erased // run FaultRoutine() BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; // Set DCO step + modulation BCSCTL3 |= LFXT1S_2; // LFXT1 = VLO IFG1 &= ~OFIFG; // Clear OSCFault flag BCSCTL2 = 0
  9. Thank you all! With y'all's help I was finally able to get this working!
  10. By global, do you mean declaring them ahead of any function (including main)? I have done that. They are all declared (or is it defined?) before main is called. I can try adding static to the ones I need to see and see if that works. What is a local break point?
  11. I did set a couple of breakpoints, but the Variables tab never populated... even in paused mode.
  12. OK.. somehow I have gotten the code to work pretty much as expected except for reading the keypad. I moved the ABCD inputs to PORT2 so I could better manage them, changed the OE pin on the 74c922 to msp430 control instead of continuously grounded... but I still have a problem. Is there no way to monitor variables in CCS debug mode? I see the Variables tab, but there is nothing there... I need to be able to see what is actually in the variables before I can debug this any further.
  13. I did... all he said was that it was so long ago and pretty much left it at that...
  14. I did use P1IE=BIT0 in the config function to select only the P1.0 pin. Would that not set bit 0 and clear all of the other bits? I didn't disable and re-enable that interrupt because with the P1IE=BIT0 command, I wouldn't think that the buzzer output would trigger another interrupt. I added the interrupt disable to the ISR and I am still getting the same results . D'oh... yeah, I guess that DOES make sense, huh?
  15. I jumped head-first in a attempted my first project - a keyad controller for an alarm system I built. Of course, it doesn't work I hope y'all can help me figure out why? The first thing I noticed is that the compiler (CCS) complains that the ISRs I created are making calls to functions. "SR PORT1_ISR calls function beep. Recommend moving function call away from ISR, or inlining the function, or using pragmas". I don't understand how to 'move [it] away from [the] ISR' or how to 'inline' it. Not sure if that is a big deal or not. Here's how this SHOULD work: when first powered up, if t
  16. The author seems to no longer offer this. I don't suppose anyone has a copy of the code and the documentation that they could share?
  17. Wow! Talk about confusing... OK.. Thank you. I get that now.
  18. I am trying to write a program using the MPS430 User Guide, the mps430g2553.h and the Getting Started tutorial as guides. I'll admit that while I do know hexidecimal, it is not my first language and having to think in hex, binary and decimal all at the same time is giving me a headache! In the Getting Started tutorial, it says to use TACTL = TASSEL_1 + MC_2 to select the ACLK and set operation to continuous mode. In the User Guide, it shows bits 5-4 of the TACTL register being set to 10 to enable continuous mode. So far so good. But when I look in the header file, it shows MC_2 being defin
  19. Oh great! Another language to learn! I did have the interfacing article, but I didn't have the keypad article. I appreciate that. I am still trying to get used to the 14- and 20-pin verisons (plus that's the only development board I have) as well as C, so I'm gonna have to forgo that article just now. But, I did save it for future reference and projects(?). Thank you!
  20. Yeah... Im kind of old-technology myself Besides, the 74c922 was the only matrix encoder I could find and I had a few laying around. So just to make sure I understand, as long as I power the 74c922 using the same 3.3 - 3.5v source as I do the MSP, then they can talk to each other without a level-shifter? I'm going to try and stick with it. I spent enough time trying to learn this, I might as well. Thanks...
  21. After spending a week getting to know the MSP430 intimately on the software side, learning how to program it and for the most part getting the hang of it, I laid out my first circuit - the main reason that I started this project in the first place: a keypad for an alarm system I built which is currently using a manual key switch. So, while designing the circuit, I was reading the datasheets on the MSP and the 74c922 keypad matrix encoder and I think I realized there's a problem. When I found the MSP, I knew it was low-power, but I thought that meant low current drain. I am attaching wh
  22. LOL.. yeah. I don't know why I kept typing 2552. Thanks... Actually what I want to print is the datasheet, not the user guide. The datasheet is only about 70 pages. And while search is nice, I'm old-fashioned... I do better with flip - as in flipping through the pages
  23. Does anyone have an Eagle CAD library file for the 20-pin msp430g2553? I found one library, but it is only for the 14-pin version. I'd appreciate it Thanks...
  24. I want to thank you guys for your help. I think I have learned quite a bit and I seem to understand most of it. I downloaded the datasheets for both the msp430g2452 and the 2552. Since they are both about 70 pages each, before I go print them out and try to learn form them... let me ask something. Is the 2452 the same as the 2552 program-wise and pin-wise, except that the 2552 has more memory space and more I/O pins? In other words, can I just print out the 2552 datasheet and use it for the 2452 as well, ignoring the extra pins and remembering that the memory is limited? Thanks again...
×
×
  • Create New...