Jump to content
43oh

nexusone1984

Members
  • Content Count

    56
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by nexusone1984

  1. I have a link to the source code on my youtube page. I using a ASCII 5X7 Character set I found in the internet, and because of memory limitations on the Micro that comes with the Launchpad(other MSP430's have little more memory). I had to trim it down some, also found using some standard C functions eat up to much RAM, so making some trimmed down ones or just write code to do only what you need. As someone pointed out function calls use RAM, so if you call too many you can end up running out of RAM. I want to write a trimmed down printf type routine, always a choice between neat lookin
  2. very simple.... I started with my seven segment display driver routine. Buffer for display data to be sent out, just scan the buffer over and over. And send the data out to the shift registers, this way don't have to worry about what the display is doing so much as just write to the buffer. Then just have to change the data in the buffer.... I shift left data in the buffer, new data enters last buffer byte. // Scroll test for(t=0; t < 44; t++) // Length of my text message { for(l=0; l < 6; l++) // my characters are 5x7 { for(i=0; i < 7; i++) // s
  3. The sounds of Silence.... Future project....I seen someone else do this on Arduino. Make a midi device.... fires solenoids at plates of a xylophone to make music. maybe a real drum, etc... make a micro controlled band.
  4. Second part of my dot matrix display test... demo of scrolling text. And a swipe effect.
  5. Jumping from my six digit Seven Segment display, I plugged in a 8X10 Dot matrix display I made from scratch. Right now just displays a trimmed down ASCII set, two 74HC595's drive the display so I only using 8X8 of the 8X10. Later add some animation and other stuff..
  6. Yeah... They did not have ADHD drugs when I was a kid... Trying to get mine a little more interested using microcomputers for other then playing games... Just put out my plants out in the vegetable garden, some future time want to build a small Green house/Cold store for starting my own plants early/Keeping those that are perennial.
  7. Just thought I would share some idea's of some my future projects and get feed back on what projects some of you are working on. 1. Color Organ - A mic, the Analog input, some Color LED's changing color to the music. or maybe USB input from a computer to drive it from MP3 output. 2. Audio Spectrum Analyzer 3. Stepper Motor Controller - logic input control (Step, Direction), maybe a smart USB or SPI interface 4. Line following Robot.... maybe make it solar powered.... 5. Weather monitoring station. 6. 8X8 DOT matrix and 5X7 DOT matrix display routines 7. 3D LED c
  8. Just like to share with you my RTC routine, displaying time, switch input, edit time, driving a 74HC595.
  9. I connect the 74HC595 with three pins from the MSP430 Launchpad to drive up to 8 seven segment LED displays. You only have a problem driving the LED's is if you turn on all of them at one time, I turn on each LED one row at a time. But I do it 100's of times a second, so you don't see them blink. But at the same time you don't draw more current then the IC can handle. My next project is using some 5X7 LED's I have laying around. Here is how I have connected the 74HC595 to my MSP430. See attachment temp-led595.pdf
  10. Best advice is to download the datasheet for a list of what ports have access to what functions. While all port pins support general input/output. The timer example used to create a PWM output, uses the internal timer's. Example: Timer_A0 out is only available on specific pins (P1.1 and P1.5), the same with Timer_A1 is (P1.2 and P1.6), which give you two options. When starting a project best to look at what I/O functions you will be using first, and then write the code. If you used software to generate the PWM, then you could use any of the port pins. Many of the TI demo'
  11. Another option would be to use the USB port in serial mode or make a serial port interface. Just download the animations as needed to the table. could even make it animated to music being played on the computer.
  12. Thanks Bluehash... that fixed the problem. Just an over view of what I have done so far. I created a timing routine that controls the timing of events: 1. Real Time clock 2. Refresh display - now done in back ground of the main program. 3. Control to make a digit blink. Binary to BCD conversion Driving the 74hc595 8-bit shift register. Seven segment table - include Hex code characters and a few special characters. To do: Clean up code. more code remark's Switch de-bounce Switch up time/down time I sure a few more things will come to mind.
  13. I will look into it, I forget a lot of coding stuff since I not in it 100% of the time. Maybe would be good to have options on the BCD decoding , on the other hand you want to reduce cycle time doing redundant stuff. Right now I go through the whole process to retrieve each digit. Maybe two functions 8 bit convert and 16 bit convert. One problem I came across is I not sure how to pass an array from my function back to my main routine. main loop int bcd_data[5]; // to hold a 16 bit binary converted to bcd. binary2bcd16( bcd_data, binary_number) // send a pointer to t
  14. Here is one of the routines I been working on: Binary to BCD. Suggestions, improvements? Useage: binary2bcd16( one of 5 digit's, 16 bit binary number) bcd = binary2bcd16( 3, 5432 ) will return third digit from the right. bcd = 4 int binary2bcd16( int d, int t ) // 16bit { int i,bcd[5]; while( i < 5) { bcd[i] = 0; i++; } if ( t > 9999 ) bcd[4] = t / 10000; if ( t > 999 ) bcd[3] = t / 1000 - bcd[4] * 10; if ( t > 99 ) bcd[2] = t / 100 - (bcd[3] * 10 + bcd[4] * 100); if ( t > 9 ) bcd[1] = t / 10 - (bcd[2] * 10 + bcd[3] * 100 + bcd[4] *
  15. Strange I changed _eint() to _EINT() and my seconds from char to int, one of those two that made it work....
  16. I going with timer A to keep track of time, but having trouble getting the interrupt to work for timer A. I running linux and using gcc compiler. my initializing of the timer A: WDTCTL = WDTPW + WDTHOLD; // Stop WDT //1Mhz BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; // Set DCO step + modulation */ CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 1000; // divide the system clock to get 1 millisecond TACTL = TASSEL_2 + MC_2; // SMCLK, contmode eint();
  17. Ok... For the initial part of my library, I am starting with basic RTC clock functions: hour, minute, seconds, milliseconds. What is the best approach to mark time, using the Watchdog timer or timer_a to interrupt every 1 millisecond. Also want to have other task going and this to happen in the back ground.
  18. Timing of events that happen at random times, and creating a timing library? I not played with the Arduino yet, people talk about its library of functions. I know some people are working on a Arduino compatible library for the 430. I was thinking of creating some useful library of functions: 1. Real time clock - What do you think of the TI RTC library? better way to do this? 2. Software PWM - PWM_int( pin, freq, duty cycle), PWM_stop(pin) 3. Switch input with debounce SW_inputdb_int(pin) state change only after time is allowed for switch bounce. SW_inputdb_rd(pin) , mayb
  19. More playing around with the 74hc595 and a 6 digit LED display from a older project. Demo shows how to display in decimal and hexadecimal, selecting a digit among a group of digits.
  20. The two transistor is not a bad idea, I have used in the past a simple transistor as a inverter gate to invert a signal. Or could use two pin's from the MSP430 if you have them to spare. In a final design I would add transistors to drive the digits (or some other device), just because of the current limitation of the 595. Also current limiting resistors would be on the list. I have a second display I going to add, my next project will be to have time and temperature displayed. I
  21. I was slack no current limiting Resistors, and maxing out the pins selecting the digit taking all the current from a possible 8 pins being active. I wonder what the current is ending up being based on my refresh rate? I had it running for 24 hours, not killed it. I would have(if I made a circuit board I would) put a transistor to sink the current on the common cathode side (digit select). Since each of the pins driving the segments only power one segment at a time normally so you have what 24 ma to maybe 35 ma(also would add current limiting resistors on it). I know cheep Engin
  22. Opp's my bad... yes it is...
  23. A poster asked about using Common cathode display, just happens that is the type I had in hand. And had been wanting to use the 74hc595 in driving LED's, so this is what I came up with. I used of code I created for my first LED display project as a base. I have drawn a schematic in Eagle for this project, which I have posted on my website in PDF format for those without Eagle. The code has some interesting bits in it.... Binary to Decimal conversion, Seven segment truth table example, writing to the 74hc595, multiplexing LED's. https://sites.google.com/site/ericstringer/ho
  24. Here is my CC 595 setup * Revised temp-led595.pdf
  25. What are you using to drive the LED's? My LED temperature project using the CD4511 which is made to drive a Common cathode LED display. If you using something like a 74hc595, Just invert the data your sending. Where one becomes zero and zero becomes one. My 74hc595 output code: j = ~data; //add the '~' which will apply a Not logic and reverses the data bits. P1OUT &= ~BIT2; //ST_clock low for(i=0; i < 8; i++) { P1OUT &= ~BIT1; //SH_clock low if (j & 0x01) { P1OUT |= BIT0; set data high }else{ P1OUT &
×
×
  • Create New...