Jump to content
Forum sending old emails Read more... ×

zinob

Members
  • Content Count

    11
  • Joined

  • Last visited

About zinob

  • Rank
    Member

Profile Information

  • Gender
    Not Telling
  • Location
    Stockholm, Sweden
  1. zinob

    LEDmatrixdriver

    ... and noo it will not work at all. It will catch fire if input goes floating. Back to the drawing board.
  2. zinob

    LEDmatrixdriver

    ... and yes, you are right, i had put the transistors the wrong way around.
  3. zinob

    LEDmatrixdriver

    Oh, i forgot to mention that i actually know what i tristate buffer is, I seem to keep forgetting to mention these important details. But I have not found a tristate buffer that can muster the relatively high current of up to 120ma needed especially not one that will accept a Vcc of 3v. The solution of just running half a row at the time was of course a smart one. But since the MSP will drive and sink at the same time (drive the row, sink the column or vise versa) it still attributes to more than 60 ma when it is both driving 60 ma and sinking the same 60 ma. This could of cause be solved by just lighting 2 leds at a time, but then I am almost wasting as many cycles and get as much flickering as I would with charlieplexing. I was considering charlieplexing but since the the diodes of the LSWT67C have slightly different forward drop I think it might get messy, and unless i waste lots of cycles on multiplexing it will probably get flickery.
  4. zinob

    LEDmatrixdriver

    Hi, I am thinking about building small a LED-matrix but according to specs the MSP430g2553 will not muster to drive 8x15 ma so i will need to use some kind of buffer-circuit. What makes it tricky is that i want to use bipolar dual coloured LEDS so i need a tri-state buffer. Does anyone know of a handy IC to do this? or if the attached circuit is sane? The idea is that both transistors will be driven low if there is no signal (input is high impedance) or the pulldown will get overpowered by any signal.
  5. Sorry, the regs I have are not LM140 but LE33CZ (yes that is supposed to be 3.3v). Despite my recklessness with the schematics (partly because of a bit to much of an "how big of a difference can it be" attitude on my part, sorry about that) your advice is nonetheless solid @@enl . @@roadrunner84 Yeah, It will have to be able to take the full load. It should however just have to dissipate 0.7*I Watts (since the forward drop over the diode is ~0.7V). With a peak load in this particular application of about 100mA that shouldn't be much of an issue though.
  6. I have a fixed regulator and need the output voltage to be exactly one forward drop over a diode higher than it is. Is there any drawback apart from the obvious "all real men use adjustable vregs" in simply putting a diode between the ground on the vreg and the electrical ground? like
  7. Hi, I am a Computer "Science" student from Stockholm Sweden (went back to school after having a few to many boring jobs). I have been programming on and off for the last 20 or so years. I started with MCU programing on the PIC 16-series waaay back but then I didn't do any MCU programming for 10 or so years. Until I for some reason I cannot recall needed it about a year ago and, after having a rage-fit at the Arduino was advised to try the Launchpad. It was love at first sight, MCU-programing was fun again! I am however not that good with electrical engineering so if I ever post a circuit diagram that seems completely insane, it probably is, so please by all means do tell me. //Zinob
  8. @@roadrunner84 What kind horror is this you ask? Well exactly the kind of horror I was going for of course! The point was to give one way of seeing the ACLK (the frequency) and another way of seeing the MCLK (the duration). Allegedly a clearer way might have been to do something like this instead of letting it go in to LPM and just used a toggle in the ISR (like you did). _BIS_SR(GIE); for(;{ _delay_cycles(1000000); /* Yes _delay_cycles is ugly but the human * eye simply cannot cope with 16 MHz. And * setting up TA1 to the MCLK would make * the example more confusing. */ P1OUT ^=BIT6; } My code was just a quick 2 minute hack, didn't really spend any time trying to make it neat, just passable to illustrate something. While your code is both saner and better from a power perspective there is nothing to illustrate the MCLK speed.
  9. Assuming you use the crystal that came with the Launchpad you should start by setting the right capacitance on the port: BCSCTL3 |= XCAP_3; //Set to 12.5pf Then getting TimerA to use the crystal should, as oPossum says be as easy as TA0CTL = TASSEL_1 | MC_1; though remember that you should do this after setting up everything else like TA0CCR0 If it still doesn't work try to run it in debugger mode (that should run the LFXT1 of the debuggers clock IIRC). If that works you probably have made a bad solder or have a dead crystal. Also please note that the crystal is about three times faster (at 32kHz) than the VLO (12kHz) so this will speed up TA some. to set the MCLK to 16 MHz simply use: BCSCTL1 = CALBC1_16MHZ; // Set DCO DCOCTL = CALDCO_16MHZ; The example below will blink the led at about 2 Hz, if you change CALBC1_16MHZ and CALDCO_16MHZ to CALBC1_16HZ and CALDCO_1MHZ respectively you will notice that the LED stays on for a much longer time, mostly noticeable as an increase in brightness. This is due to the fact that the _delay_cycles part in the ISR now runs 16 times as long. #include <msp430g2553.h> void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL3 |= XCAP_3; //Set the LFXT cap to 12.5pf BCSCTL1 = CALBC1_16MHZ; // Set DCO DCOCTL = CALDCO_16MHZ; P1DIR |= BIT0+BIT6; // because we allways need to blink LED-s P1OUT &= ~(BIT0+BIT6); //Activate Timer A0 TA0CCTL0 = CCIE; // CCR0 interrupt enabled TA0CCR0 = 16383; TA0CTL = TASSEL_1 + MC_1; // ACLK, upmode _BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/ interrupt } // Timer A0 interrupt service routine #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_0A (void) { P1OUT |=BIT0; _delay_cycles(40000); P1OUT &=~(BIT0); }
  10. zinob

    Nokia 5110 display

    Right, picture: As you can see it is slightly wider and twice as high as the original font.
  11. zinob

    Nokia 5110 display

    The Reset solution in OP is not quite up to the specs which says something along the lines of "Must be low upon power-on and must then be pulled high within 0.1 second" . But it works and saves 1 on the MSP! I needed a font which could be read from a larger distance. It would probably have been better to change addressing mode to V than to use this solution. But despite being un-pretty it woks. I have also attached the bash-script (dependent on NetPBM) i used to convert the font http://scruss.com/enterprise.net/Images/pbmtext_atari8x16.png .Any 8x16 pbmtext/BDF-font, Other font-sizes will work but the crop values will need to be changed. Since it is a quick-hack you have to manually remove the first , in the generated struct. The byte-order of the generated struct is not optimal from a speed standpoint, and the generated font lacks a degree-sign. So it is by no means perfect. Still, if you just need a quick-hack to display larger text and have a few cycles to spare, why re-invent the wheel? Added this to main.c void writeBigStringToLCD(const char *string,char x,char y) { while(*string) { writeBigCharToLCD(*string++,x,y); x+=8; } } void writeBigCharToLCD(char c,char x,char y) { //TODO get this to work unsigned char i; setAddr(x,y); for(i = 1; i < 16; i+=2) { writeToLCD(LCD5110_DATA, bigFont[c - 0x20][i]); } setAddr(x,y+1); for(i = 0; i < 16; i+=2) { writeToLCD(LCD5110_DATA, bigFont[c - 0x20][i]); } writeToLCD(LCD5110_DATA, 0); } Added this to PDC8544.h static const char bigFont[][16] = { // big font {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // ,{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xfe, 0x19, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // ! ,{0x00, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00} // " ,{0x01, 0x98, 0x07, 0xfe, 0x07, 0xfe, 0x01, 0x98, 0x01, 0x98, 0x07, 0xfe, 0x07, 0xfe, 0x00, 0x00} // # ,{0x00, 0x00, 0x06, 0x3c, 0x06, 0x7e, 0x1e, 0x67, 0x1e, 0x67, 0x07, 0xe6, 0x03, 0xc6, 0x00, 0x00} // $ ,{0x00, 0x00, 0x06, 0x0e, 0x07, 0x8e, 0x01, 0xe0, 0x00, 0x78, 0x07, 0x1e, 0x07, 0x06, 0x00, 0x00} // % ,{0x0f, 0x80, 0x1f, 0xe7, 0x18, 0x7f, 0x19, 0xf9, 0x0f, 0x9f, 0x1f, 0x87, 0x19, 0x80, 0x00, 0x00} // & ,{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // ' ,{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x0f, 0xfc, 0x1c, 0x0e, 0x10, 0x02, 0x00, 0x00} // ( ,{0x00, 0x00, 0x10, 0x02, 0x1c, 0x0e, 0x0f, 0xfc, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // ) ,{0x00, 0x60, 0x06, 0x66, 0x07, 0xfe, 0x01, 0xf8, 0x01, 0xf8, 0x07, 0xfe, 0x06, 0x66, 0x00, 0x00} // * ,{0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x03, 0xfc, 0x03, 0xfc, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00} // + ,{0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x3e, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // , ,{0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00} // - ,{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // . ,{0x00, 0x00, 0x1c, 0x00, 0x1f, 0x00, 0x03, 0xc0, 0x00, 0xf0, 0x00, 0x3e, 0x00, 0x0e, 0x00, 0x00} // / ,{0x00, 0x00, 0x0f, 0xfc, 0x1f, 0xfe, 0x18, 0x86, 0x18, 0x46, 0x1f, 0xfe, 0x0f, 0xfc, 0x00, 0x00} // 0 ,{0x00, 0x00, 0x18, 0x00, 0x18, 0x18, 0x1f, 0xfe, 0x1f, 0xfe, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00} // 1 ,{0x00, 0x00, 0x18, 0x1c, 0x1e, 0x1e, 0x1f, 0x86, 0x19, 0xe6, 0x18, 0x7e, 0x18, 0x1c, 0x00, 0x00} // 2 ,{0x00, 0x00, 0x0e, 0x06, 0x1e, 0x06, 0x18, 0x66, 0x19, 0xfe, 0x1f, 0x9e, 0x0e, 0x06, 0x00, 0x00} // 3 ,{0x00, 0x00, 0x07, 0x80, 0x07, 0xe0, 0x06, 0x78, 0x1f, 0xfe, 0x1f, 0xfe, 0x06, 0x00, 0x00, 0x00} // 4 ,{0x00, 0x00, 0x0c, 0x7e, 0x1c, 0x7e, 0x18, 0x66, 0x18, 0x66, 0x1f, 0xe6, 0x0f, 0xc6, 0x00, 0x00} // 5 ,{0x00, 0x00, 0x0f, 0xf8, 0x1f, 0xfc, 0x18, 0xce, 0x18, 0xc6, 0x1f, 0xc6, 0x0f, 0x80, 0x00, 0x00} // 6 ,{0x00, 0x00, 0x00, 0x06, 0x1e, 0x06, 0x1f, 0x86, 0x01, 0xe6, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x00} // 7 ,{0x00, 0x00, 0x0f, 0x9c, 0x1f, 0xfe, 0x18, 0x66, 0x18, 0x66, 0x1f, 0xfe, 0x0f, 0x9c, 0x00, 0x00} // 8 ,{0x00, 0x00, 0x00, 0x3c, 0x18, 0x7e, 0x18, 0x66, 0x1c, 0x66, 0x0f, 0xfe, 0x07, 0xfc, 0x00, 0x00} // 9 ,{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x78, 0x1e, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // : ,{0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x3e, 0x78, 0x1e, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // ; ,{0x00, 0x40, 0x00, 0xe0, 0x01, 0xf0, 0x03, 0xb8, 0x07, 0x1c, 0x06, 0x0c, 0x04, 0x04, 0x00, 0x00} // < ,{0x00, 0x00, 0x01, 0x98, 0x01, 0x98, 0x01, 0x98, 0x01, 0x98, 0x01, 0x98, 0x01, 0x98, 0x00, 0x00} // = ,{0x04, 0x04, 0x06, 0x0c, 0x07, 0x1c, 0x03, 0xb8, 0x01, 0xf0, 0x00, 0xe0, 0x00, 0x40, 0x00, 0x00} // > ,{0x00, 0x00, 0x00, 0x1c, 0x00, 0x1e, 0x1b, 0x86, 0x1b, 0xe6, 0x00, 0x7e, 0x00, 0x1c, 0x00, 0x00} // ? ,{0x07, 0xf8, 0x0f, 0xfc, 0x1c, 0x0e, 0x19, 0xe6, 0x19, 0x26, 0x19, 0xcc, 0x0c, 0xf8, 0x00, 0x00} // @ ,{0x00, 0x00, 0x1f, 0xf8, 0x1f, 0xfc, 0x01, 0x8e, 0x01, 0x8e, 0x1f, 0xfc, 0x1f, 0xf8, 0x00, 0x00} // A ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x18, 0x66, 0x18, 0x66, 0x1f, 0xfe, 0x0f, 0xbc, 0x00, 0x00} // B ,{0x00, 0x00, 0x0f, 0xfc, 0x1f, 0xfe, 0x18, 0x06, 0x18, 0x06, 0x1e, 0x1e, 0x0e, 0x1c, 0x00, 0x00} // C ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x18, 0x06, 0x1c, 0x0e, 0x0f, 0xfc, 0x07, 0xf8, 0x00, 0x00} // D ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x18, 0x66, 0x18, 0x66, 0x18, 0x66, 0x18, 0x06, 0x00, 0x00} // E ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x66, 0x00, 0x66, 0x00, 0x66, 0x00, 0x06, 0x00, 0x00} // F ,{0x00, 0x00, 0x0f, 0xfc, 0x1f, 0xfe, 0x18, 0x06, 0x18, 0x66, 0x1f, 0xe6, 0x0f, 0xe6, 0x00, 0x00} // G ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x60, 0x00, 0x60, 0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x00} // H ,{0x00, 0x00, 0x18, 0x06, 0x18, 0x06, 0x1f, 0xfe, 0x1f, 0xfe, 0x18, 0x06, 0x18, 0x06, 0x00, 0x00} // I ,{0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1f, 0xfe, 0x0f, 0xfe, 0x00, 0x00} // J ,{0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x60, 0x01, 0xf8, 0x07, 0x9e, 0x1e, 0x06, 0x18, 0x00, 0x00, 0x00} // K ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00} // L ,{0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x38, 0x00, 0xe0, 0x00, 0x38, 0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x00} // M ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0xf0, 0x03, 0xc0, 0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x00} // N ,{0x00, 0x00, 0x0f, 0xfc, 0x1f, 0xfe, 0x18, 0x06, 0x18, 0x06, 0x1f, 0xfe, 0x0f, 0xfc, 0x00, 0x00} // O ,{0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x01, 0x86, 0x01, 0x86, 0x01, 0xfe, 0x00, 0xfc, 0x00, 0x00} // P ,{0x00, 0x00, 0x0f, 0xfc, 0x1f, 0xfe, 0x18, 0x06, 0x0c, 0x06, 0x1b, 0xfe, 0x17, 0xfc, 0x00, 0x00} // Q ,{0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0xc6, 0x01, 0xc6, 0x07, 0xfe, 0x1e, 0x7c, 0x18, 0x00, 0x00, 0x00} // R ,{0x00, 0x00, 0x18, 0x3c, 0x18, 0x7e, 0x18, 0xe6, 0x19, 0xc6, 0x1f, 0x86, 0x0f, 0x06, 0x00, 0x00} // S ,{0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x1f, 0xfe, 0x1f, 0xfe, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00} // T ,{0x00, 0x00, 0x0f, 0xfe, 0x1f, 0xfe, 0x18, 0x00, 0x18, 0x00, 0x1f, 0xfe, 0x0f, 0xfe, 0x00, 0x00} // U ,{0x00, 0x00, 0x01, 0xfe, 0x07, 0xfe, 0x1e, 0x00, 0x1e, 0x00, 0x07, 0xfe, 0x01, 0xfe, 0x00, 0x00} // V ,{0x1f, 0xfe, 0x0f, 0xfe, 0x07, 0x00, 0x03, 0xc0, 0x07, 0x00, 0x0f, 0xfe, 0x1f, 0xfe, 0x00, 0x00} // W ,{0x00, 0x00, 0x1c, 0x0e, 0x1f, 0x3e, 0x03, 0xf0, 0x03, 0xf0, 0x1f, 0x3e, 0x1c, 0x0e, 0x00, 0x00} // X ,{0x00, 0x00, 0x00, 0x1e, 0x00, 0x7e, 0x1f, 0xe0, 0x1f, 0xe0, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x00} // Y ,{0x00, 0x00, 0x1e, 0x06, 0x1f, 0x86, 0x19, 0xe6, 0x18, 0x7e, 0x18, 0x1e, 0x18, 0x06, 0x00, 0x00} // Z ,{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x1f, 0xfe, 0x18, 0x06, 0x18, 0x06, 0x00, 0x00} // [ ,{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // font2struct.tgz
×