Jump to content

RobG

Members
  • Content Count

    3,117
  • Joined

  • Last visited

  • Days Won

    247

Everything posted by RobG

  1. RobG

    TLC5940 driver for Tiva

    You can find schematic right here. As for the PWM Timer... can't remember why it is there, but I believe I was testing something else and forgot to remove it
  2. RobG

    MSP430 Nixie Clock

    Dave's clock
  3. RobG

    Updates and going forward

    Perfect!
  4. RobG

    Updates and going forward

    All in one solution is good because you don't have to switch between several sites, however, large number of posts will make things difficult. The best solution would be a single forum with filtering capability. For example, when I come in, I want to be able to see new content just in 430 section, no CCxxxx or other (looks like CC is taking over 430 space, those posts should really be moved to ARM space.) A row of check boxes somewhere on top would be nice: 430, CC, Tiva/ARM, C2K, BBB, etc., you check what you want to look at and any action would bring up only posts from the appropriate section.
  5. Specs: 1.3" 96x68 pixels controlled backlight 5 tact switches with RC debouncing STE2007 driver Code: 1202_booster_pack.cSTE2007.hfont_5x7.h
  6. RobG

    Voltage regulator 12vdc to 3.3vdc

    You can get LM2596 (or high voltage version LM2596HV) based DC-DC converters from eBay for as little as $1.
  7. RobG

    Nokia 1202 LCD Booster Pack Pin outs

    See this post. The problems you are experiencing with the library are because spirilis' Energia library was written for his Nokia 1202 BP.
  8. RobG

    Nokia 1202 Booster Pack (RobG)

    V4 schematic Nokia 1202 BoosterPack v4.pdf
  9. RobG

    General use triac boards

    I made a new version of this board, all through hole. Should be available in few weeks. If you have SMD version but don't want to use SMD parts, you can do this: Be careful though, you may rip the pads if you push components too hard.
  10. RobG

    (Universal) Color LCD graphics library

    SCK - P1.5 SDA - P1.7 DC - P1.4 CS - P1.0 RESET - you can connect to any pin and reset in software, connect to R/C (47k/0.1uF,) or use LP's RESET (but you will not be able to see anything when debugging.) In worst case scenario, you can try connecting it to Vcc. Looks like this board has an LDO, is J1 for 3.3V operation? If yes, short it.
  11. RobG

    PWM duty cycle change with digital input ?

    BTW, here's the code for what you are trying to do. 1 PWM channel, 1 switch, press & release to toggle on/off, press & hold to dim up & down. To test it, remove one of the LED's shorting blocks and connect it to P2.2. #include "msp430g2553.h" /* * main.c */ typedef unsigned char u_char; #define LED_PIN BIT2 // P2.2 TA1.1 #define SWITCH_PIN BIT3 // P1.3 LaunchPsd's S2 switch #define TOGGLE_DELAY 37500 // time after we test for press & release 250ms @ 1MHz & /8 #define FIRST_DELAY 37500 // time after we start dimming (after press & release test) 250ms #define STEP_DELAY 1500 // dimmer step interval 10ms u_char hold = 0; // when 1, it means we are holding the button u_char direction = 1; // dimmer direction, 1 is up int main(void) { WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer BCSCTL1 = CALBC1_1MHZ; // 1MHz clock DCOCTL = CALDCO_1MHZ; // setup PWM output P2DIR |= LED_PIN; P2SEL |= LED_PIN; P2OUT &= ~LED_PIN; // input pin P1OUT |= SWITCH_PIN; // pull up P1REN |= SWITCH_PIN; // enable resistors P1IES |= SWITCH_PIN; // trigger hi -> low P1IFG &= ~SWITCH_PIN; // clear flags P1IE |= SWITCH_PIN; // enable interrupts // timer TA0, used to monitor the switch TA0CCR0 = 0; // full cycle TA0CTL = TASSEL_2 + MC_1 + ID_3; // SMCLK/8, upmode // timer TA1, PWM timer TA1CCR0 = 255; // full cycle TA1CCTL1 = OUTMOD_7; // CCR1 set/reset TA1CCR1 = 0; // CCR1 default 0 TA1CTL = TASSEL_2 + MC_1 + ID_3; // SMCLK/8, upmode _bis_SR_register(LPM0_bits + GIE); // LPM0 with interrupt while (1) ; } // Timer A0 interrupt service routine #pragma vector = TIMER0_A0_VECTOR __interrupt void Timer_A0(void) { if (hold) { if (P1IN & SWITCH_PIN) { // switch is up, end of press & hold TA0CCTL0 &= ~CCIE; // disable timer TA0CCR0 = 0; P1IFG = 0; // enable switch interrupt P1IE |= SWITCH_PIN; } else { // still holding TA0CCR0 = STEP_DELAY; if (P2DIR & LED_PIN) { // PWNM output is on, we can update PWM if (direction) { // change PWM according to direction TA1CCR1++; if (TA1CCR1 == TA1CCR0) { // all the way up, change direction direction = 0; } } else { TA1CCR1--; if (TA1CCR1 == 0) { // all the way down, change direction direction = 1; } } } } } else { if (P1IN & SWITCH_PIN) { // switch is up, press & hold, toggle output P2DIR ^= LED_PIN; // toggle output on/off TA0CCTL0 &= ~CCIE; // stop timer TA0CCR0 = 0; P1IFG = 0; // enable switch interrupt P1IE |= SWITCH_PIN; } else { TA0CCR0 = FIRST_DELAY; // looks like press & hold hold = 1; } } } // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { P1IE = 0; // disable switch interrupt TA0CCR0 = TOGGLE_DELAY; // set time & enable timer TA0CCTL0 = CCIE; hold = 0; }
  12. RobG

    PWM duty cycle change with digital input ?

    I just noticed your post re 3414 PCBs. I have few if you want, I just didn't have time to test them (they are based on another board I made, so they should be fine.)
  13. RobG

    PWM duty cycle change with digital input ?

    Setup one timer to output PWM signal. Setup second timer to start counting when switch interrupt is detected (you could also use WDT, but it's less flexible than Timer.) When timer interrupts, check the state of the button. If not pressed anymore, it means short press, toggle PWM output on/off (only when hold flag is false,) stop the timer, set the hold flag. If still pressed, increase CCRx, start counting again, set the hold flag to true. Second timer could also be used for de-bouncing, you could adjust CCR1 after first Timer interrupt. Disable switch's interrupt when pressed, enable when Timer detects switch release.
  14. RobG

    Starting a MSP Synth

    If you want to use DACs, check out MCP49xx/MCP48xx series or TI's DAC121S101/DAC101S101, or DAC6311/DAC7311
  15. RobG

    General use triac boards

    They are in the schematic, right here (and for older version here.) SMD was used do to space limitations.
  16. RobG

    WS2812 WS2811 driver (Tiva)

    I don't have time to port it to CC3200 right now, but it should be fairly easy.
  17. RobG

    MSP430 Bootloader

    BTW, not all, but some G2 series chips (2x53, 2x44, and 2x55) do have BSL. See slau319.
  18. I will try to finish my touch library this weekend, if not, I will email you what I have. Reading touch controller is not a problem, getting accurate position is 1. TSC controller's max SPI speed is 2MHz. If you are using bit banging, you should be fine (if your master clock is 16MHz.) 2. Make sure LCD's CS is high when reading from touch controller.
  19. RobG

    Analog Discovery

    If you ever wanted to get logic analyzer, you should take a look at Digilent's Analog Discovery. Analog Discovery is a multifunction device developed by Digilent in cooperation with Analog Devices (AD is filled with chips from AD.) AD features analog and digital inputs and outputs, and can be used as an oscilloscope, function generator, logic analyzer, pattern generator, virtual I/O, voltmeter, spectrum analyzer, network analyzer, and even power supply. And the best part, it's affordable, especially for US students. I got my AD several days ago and let me tell you, AD is a true Swiss Army knife for geeks. To show you how useful AD can be, I used it to test new version of my audio analyzer BoosterPack. For my tests, I am using oscilloscope, logic analyzer, and waveform generator instruments (AD comes with software called WaveForms, which is a suite of virtual instruments.) Waveform generator provides 2 audio signals (via 3.5mm stereo jack) to BP's audio input. A simple tone or a sweep can be generated, so many options. Oscilloscope is connected via (optional) BNC Adapter Board and a probe to audio switch's output, so I can see which signal is fed to the EQ chip. Finally, logic analyzer is connected to LP's SPI output and displays sampled data. Analog Discovery's pinout
  20. Try my C code and see if that works for you. If it does, then you know it's the code , not LEDs.
  21. Which LEDs do you have? WS2812 or WS2811? Timing differences might be an issues here. You can also try non-energia code, here or here.
  22. @@spirilis, my lib has pixel read function if you need it.
  23. RobG

    [Library] Color LCD graphics library

    Hi, "H24 v2" uses the same pinout as 2.2 v3 (see post #26) and my lib was not yet updated to reflect that. Default config: PE4 D/C PA4 CS LCD The touch pins are: PA5 PENIRQ PA6 CS TP And here's the schematic
  24. RobG

    Analog Discovery

    It really is. I am not a big fan of all-in-one solutions and I prefer my instruments to have real knobs, but this little device is going to be my #1 or at least my "first responder" from now on. It fits perfectly in my laptop bag right next to LaunchPads.
×