Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    kenemon reacted to bluehash in Binary file output from CCS?   
    Check your build options to generate output files.
  2. Like
    kenemon reacted to MarkoeZ in End of Year Stellaris Kits on Sale including Evalbot   
    Errmmm, first going to quote from my own message:
    What i did was get the files that can be downloaded at the same place as the PDF, here
    Then i loaded one of the tutorial workspaces with example code into IAR, and started hacking away. For that latest video i only added a new task that displays messages to an existing motor control example project. Did learn a lot about creating tasks and how they work together though.
    Really, i learn pretty fast, and am not afraid to dive into new stuff, but basically im still a noob. So not sure I'm the one that should be giving advice
  3. Like
    kenemon reacted to gwdeveloper in CapSense-Launchpad with the Evalbot   
    Hello guille36, there's not much code to share.
    TI's unreleased EKG Booster Pack contains the wireless UART software for the RF2500t. http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/EKG-Based-Heart-Rate-Monitor/1_00_00_00/index_FDS.html
    The default CapSense Booster pack software is installed on the Launchpad.
    On the Evalbot, it's collecting the data via the UART and simply toggling the LED via the UART ISR. The code I'm running on the bot is below. As of now, the bot displays a simple logo and the temperature. LED is toggling on data receive. No drive functions have been enabled as of yet.

    #include #include "utils/ustdlib.h" #include "lm3s9b92.h" #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "inc/hw_ethernet.h" #include "inc/hw_timer.h" #include "inc/hw_ints.h" #include "driverlib/ethernet.h" #include "driverlib/gpio.h" #include "driverlib/rom.h" #include "driverlib/sysctl.h" #include "driverlib/systick.h" #include "driverlib/interrupt.h" #include "driverlib/adc.h" #include "driverlib/timer.h" #include "driverlib/uart.h" #include "display96x16x1.h" #include "io.h" void set_PLL(void); void ethernet_OFF(void); void init_ADC(void); void init_RTC(void); void sample_Temperature(void); static volatile unsigned long g_ulTickCount; unsigned long ulADC0_Value[1]; unsigned int ulTemp_ValueC; unsigned int ulTemp_ValueF; char buffer[8] = "00000000"; static const unsigned char gwdev[96*2] = { //top 8 rows, 96 columns 0,0,0,0, 0x3E, 0x22, 0x2A, 0x3A, 0, 0x0C, 0x10, 0x20, 0x10, 0x18, 0x20, 0x10, 0x0c, 0, 0x3E, 0x22, 0x22, 0x1C, 0, 0x3C, 0x2C, 0x24, 0x2C, 0, 0x0C, 0x10, 0x20, 0x10, 0x0C, 0, 0x3C, 0x2C, 0x24, 0x2C, 0, 0x3E, 0, 0x3C, 0x24, 0x24, 0x3C, 0, 0x7E, 0x12, 0x12, 0x0C, 0, 0x3C, 0x2C, 0x24, 0x2C, 0, 0x3C, 0x08, 0x04, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //bottom 8 rows, 96 columns 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; void main(void) { set_PLL(); // set clock to run from PLL at 20Mhz ethernet_OFF(); //conflict with bsp! // turn off to save batteries init_ADC(); init_RTC(); LEDsInit(); SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); GPIOPinConfigure(GPIO_PB4_U1RX); GPIOPinConfigure(GPIO_PB5_U1TX); GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_5); UARTConfigSetExpClk(UART1_BASE, SysCtlClockGet(), 9600, UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE); IntEnable(INT_UART1); UARTIntEnable(UART1_BASE, UART_INT_RX | UART_INT_RT); /* set systick and enable interrupts */ SysTickPeriodSet(SysCtlClockGet() / 1 ); IntMasterEnable(); SysTickIntEnable(); SysTickEnable(); /**/ Display96x16x1Init(true); // init OLED Display96x16x1ImageDraw(gwdev, 0, 0, 96, 2); // display logo while (1) { sample_Temperature(); Display96x16x1StringDraw(buffer, 79, 0); }; } void set_PLL(void) { // use PLL, main OSC and 16MHZ xtal SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); } void init_ADC(void) { SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); //enable adc0 ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0); // sequence 3 is single sample, processor trigger ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_TS | ADC_CTL_IE | ADC_CTL_END); // sample and set int when done ADCSequenceEnable(ADC0_BASE, 3); // enable sequence ADCIntClear(ADC0_BASE, 3); // clear interrupt } void init_RTC(void) { SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0); TimerConfigure(TIMER0_BASE, TIMER_CFG_32_BIT_PER ); TimerLoadSet(TIMER0_BASE, TIMER_A, SysCtlClockGet()); TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT); IntEnable(INT_TIMER0A); TimerEnable(TIMER0_BASE, TIMER_A); } void sample_Temperature(void) { ADCProcessorTrigger(ADC0_BASE, 3); while(!ADCIntStatus(ADC0_BASE, 3, false)) { } ADCSequenceDataGet(ADC0_BASE, 3, ulADC0_Value); ulTemp_ValueC = ((1475 * 1023) - (2250 * ulADC0_Value[0])) / 10230; ulTemp_ValueF = ((ulTemp_ValueC * 9) + 160) / 5; SysCtlDelay(SysCtlClockGet() / 12); usprintf(buffer, "%dF", ulTemp_ValueF); } void ethernet_OFF(void) { unsigned long ulPHYMR0; SysCtlPeripheralEnable(SYSCTL_PERIPH_ETH); ulPHYMR0 = EthernetPHYRead(ETH_BASE, PHY_MR0); EthernetPHYWrite(ETH_BASE, PHY_MR0, ulPHYMR0 | PHY_MR0_PWRDN); } // SysTick ISR void SysTickHandler(void) { // Increment the tick counter, should be 1 second g_ulTickCount++; //LED_Toggle(LED_2); } // RTC ISR void RTC_IntHandler(void) { TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT); //TimerGetValue // insert ulocaltime conversion here LED_Toggle(LED_1); } // UART1 ISR void UART1_IntHandler(void) { unsigned long ulStatus; LED_Toggle(LED_2); // // Get the interrrupt status. // ulStatus = UARTIntStatus(UART1_BASE, true); // // Clear the asserted interrupts. // UARTIntClear(UART1_BASE, ulStatus); // // Loop while there are characters in the receive FIFO. // while(UARTCharsAvail(UART1_BASE)) { // // Read the next character from the UART and write it back to the UART. // UARTCharPutNonBlocking(UART1_BASE, UARTCharGetNonBlocking(UART1_BASE)); } }

    //***************************************************************************** // // startup_ccs.c - Startup code for use with TI's Code Composer Studio. // // Copyright (c) 2011 Texas Instruments Incorporated. All rights reserved. // Software License Agreement // // Texas Instruments (TI) is supplying this software for use solely and // exclusively on TI's microcontroller products. The software is owned by // TI and/or its suppliers, and is protected under applicable copyright // laws. You may not combine this software with "viral" open-source // software in order to form a larger program. // // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL // DAMAGES, FOR ANY REASON WHATSOEVER. // // This is part of revision 7243 of the Stellaris Firmware Development Package. // //***************************************************************************** //***************************************************************************** // // Forward declaration of the default fault handlers. // //***************************************************************************** void ResetISR(void); static void NmiSR(void); static void FaultISR(void); static void IntDefaultHandler(void); //***************************************************************************** // // External declaration for the reset handler that is to be called when the // processor is started // //***************************************************************************** extern void _c_int00(void); //***************************************************************************** // // Linker variable that marks the top of the stack. // //***************************************************************************** extern unsigned long __STACK_TOP; //***************************************************************************** // // External declarations for the interrupt handlers used by the application. // //***************************************************************************** extern void SoundIntHandler(void); extern void SysTickHandler(void); extern void RTC_IntHandler(void); extern void UART1_IntHandler(void); //***************************************************************************** // // The vector table. Note that the proper constructs must be placed on this to // ensure that it ends up at physical address 0x0000.0000 or at the start of // the program if located at a start address other than 0. // //***************************************************************************** #pragma DATA_SECTION(g_pfnVectors, ".intvecs") void (* const g_pfnVectors[])(void) = { (void (*)(void))((unsigned long)&__STACK_TOP), // The initial stack pointer ResetISR, // The reset handler NmiSR, // The NMI handler FaultISR, // The hard fault handler IntDefaultHandler, // The MPU fault handler IntDefaultHandler, // The bus fault handler IntDefaultHandler, // The usage fault handler 0, // Reserved 0, // Reserved 0, // Reserved 0, // Reserved IntDefaultHandler, // SVCall handler IntDefaultHandler, // Debug monitor handler 0, // Reserved IntDefaultHandler, // The PendSV handler SysTickHandler, // The SysTick handler IntDefaultHandler, // GPIO Port A IntDefaultHandler, // GPIO Port B IntDefaultHandler, // GPIO Port C IntDefaultHandler, // GPIO Port D IntDefaultHandler, // GPIO Port E IntDefaultHandler, // UART0 Rx and Tx UART1_IntHandler, // UART1 Rx and Tx IntDefaultHandler, // SSI0 Rx and Tx IntDefaultHandler, // I2C0 Master and Slave IntDefaultHandler, // PWM Fault IntDefaultHandler, // PWM Generator 0 IntDefaultHandler, // PWM Generator 1 IntDefaultHandler, // PWM Generator 2 IntDefaultHandler, // Quadrature Encoder 0 IntDefaultHandler, // ADC Sequence 0 IntDefaultHandler, // ADC Sequence 1 IntDefaultHandler, // ADC Sequence 2 IntDefaultHandler, // ADC Sequence 3 IntDefaultHandler, // Watchdog timer RTC_IntHandler, // Timer 0 subtimer A IntDefaultHandler, // Timer 0 subtimer B IntDefaultHandler, // Timer 1 subtimer A IntDefaultHandler, // Timer 1 subtimer B IntDefaultHandler, // Timer 2 subtimer A IntDefaultHandler, // Timer 2 subtimer B IntDefaultHandler, // Analog Comparator 0 IntDefaultHandler, // Analog Comparator 1 IntDefaultHandler, // Analog Comparator 2 IntDefaultHandler, // System Control (PLL, OSC, BO) IntDefaultHandler, // FLASH Control IntDefaultHandler, // GPIO Port F IntDefaultHandler, // GPIO Port G IntDefaultHandler, // GPIO Port H IntDefaultHandler, // UART2 Rx and Tx IntDefaultHandler, // SSI1 Rx and Tx IntDefaultHandler, // Timer 3 subtimer A IntDefaultHandler, // Timer 3 subtimer B IntDefaultHandler, // I2C1 Master and Slave IntDefaultHandler, // Quadrature Encoder 1 IntDefaultHandler, // CAN0 IntDefaultHandler, // CAN1 IntDefaultHandler, // CAN2 IntDefaultHandler, // Ethernet IntDefaultHandler, // Hibernate IntDefaultHandler, // USB0 IntDefaultHandler, // PWM Generator 3 IntDefaultHandler, // uDMA Software Transfer IntDefaultHandler, // uDMA Error IntDefaultHandler, // ADC1 Sequence 0 IntDefaultHandler, // ADC1 Sequence 1 IntDefaultHandler, // ADC1 Sequence 2 IntDefaultHandler, // ADC1 Sequence 3 SoundIntHandler, // I2S0 IntDefaultHandler, // External Bus Interface 0 IntDefaultHandler // GPIO Port J }; //***************************************************************************** // // This is the code that gets called when the processor first starts execution // following a reset event. Only the absolutely necessary set is performed, // after which the application supplied entry() routine is called. Any fancy // actions (such as making decisions based on the reset cause register, and // resetting the bits in that register) are left solely in the hands of the // application. // //***************************************************************************** void ResetISR(void) { // // Jump to the CCS C Initialization Routine. // __asm(" .global _c_int00\n" " b.w _c_int00"); } //***************************************************************************** // // This is the code that gets called when the processor receives a NMI. This // simply enters an infinite loop, preserving the system state for examination // by a debugger. // //***************************************************************************** static void NmiSR(void) { // // Enter an infinite loop. // while(1) { } } //***************************************************************************** // // This is the code that gets called when the processor receives a fault // interrupt. This simply enters an infinite loop, preserving the system state // for examination by a debugger. // //***************************************************************************** static void FaultISR(void) { // // Enter an infinite loop. // while(1) { } } //***************************************************************************** // // This is the code that gets called when the processor receives an unexpected // interrupt. This simply enters an infinite loop, preserving the system state // for examination by a debugger. // //***************************************************************************** static void IntDefaultHandler(void) { // // Go into an infinite loop. // while(1) { } }
    That's pretty much where I paused the project. The bot is a really nice learning toy but I've got other projects that are taking priority.
  4. Like
    kenemon reacted to zeke in How to solder this?   
    You could liquefy the rosin with some isopropyl alcohol in a small bottle.
    Use a Q-tip to dispense it.
  5. Like
    kenemon reacted to zeke in What did you to today?   
    I decided that I needed to complete something today so I made my own single USB UART board based on the FTDI FT232RL.

    What did you do today?
  6. Like
    kenemon reacted to hockeyrcks9901 in Rain Simulator Motor Control System   
    Sorry about it taking so long to get the code up, I was on vacation. This is just the code for the simulator, not the wireless rain gauge. I'll put that up shortly.
  7. Like
    kenemon reacted to GarySeven in SimpiciTI Tutorial for CC2500   
    The radio chips don
  8. Like
    kenemon got a reaction from pine in DesignSpark chipKIT Challenge - 1000 chipKIT boards   
    Still waiting on the kit. My project is elaboration upon the "solar tracker" I posted earlier this year. The application for the kit took five minutes... :angel:
    I think this mcu will handle the web server idea and possibly interface with wifi??
    I do not plan on shifting this project over to that site, but I feel obligated to at least try the thing out, and report. The STM discovery was a letdown, and although it is a very advanced device, it had some difficulty with just getting it to work for folks....
    Also, I am kind of addicted to the MSP's and TI which i use for the processing and i/o.
    ( i would rather fight for the POM rework kit, but i am not ready :x )
  9. Like
    kenemon got a reaction from pine in Door open/close logger   
    You could easily add a hall sensor and drill a small magnet into the door to avoid the dangling bracket at the height of a 85 year old's eyeball
  10. Like
    kenemon reacted to RobG in X10   
    X-10 is very simple, you detect zero crossing point and send 120kHz modulated pulses. The frame size is 11bits and consists of 2 start bits, 4 bits house code, and 5 bits unit/cmd code (simply speaking, there is little more to this.)
    The 120kHz pulse duration is 1ms, and when needed, it has to be transmitted at zero crossing (there should also be 2 more pulses following it, one 2.78ms after zero crossing, another 5.56ms after zero crossing.)
    Binary one is represented by a pulse at zero crossing followed by the absence of a pulse at the next crossing.
    Binary zero is represented by the absence of a pulse at zero crossing followed by a pulse at the next crossing.
    Start code is a little bit different. It spans 4 zero crossings and there are 3 pulses followed by the absence.
    So for example to send house G (0101) code and all lights off (01101) function code, you send 1ms 120kHz pulses like this (1 represents pulse, 0 no pulse) at each zero crossing:

  11. Like
    kenemon reacted to zeke in Which Mac to buy?   
    The web server is there for device configuration mainly.
    Yes, another computer could be used to collect data and later serve it up in many different ways.
    What I really want is real time data from my device and real time control over it as well.
  12. Like
    kenemon reacted to RobG in Which Mac to buy?   
    I need a web server module to build X-10 controller for example. Ether/WiFi -> web server -> MSP430 -> X-10
  13. Like
    kenemon reacted to RobG in Which Mac to buy?   
    "It runs on iOS correct?" - Yes.
    "I also understand this is similar to MacOS X?" - There are a lot of shared libraries between those 2, but they are 2 different OSs.
    "Will the drivers for OS X work on the ipad?" - No.
    "Can I install drivers manually?" - No.
    "Seems like it might be easier to fashion a bluetooth or WiFi connection to the LP than get the USB working directly" - You are correct, implementing anything that uses USB on iPad is a pain.
  14. Like
    kenemon reacted to gwdeveloper in SimpiciTI Tutorial for CC2500   
    I've looked at the LSR wifi modules but never had a chance to test with one. LSR does have a SimpliciTI porting guide in their download section though. You may want to look at that to see if it requires any other changes.
  15. Like
    kenemon reacted to bluehash in PetiteFS FATfs SDCard USCI code   
    - Open/Read/Write File
    - Delete file
    - Seek file
    Should be.
    Pardoned. Now go party.
  16. Like
    kenemon reacted to PentiumPC in [TIDEALS] Dec 6th, 2011 - MSP-FET430U28A bundle $75.00   
    I asked this question sometime ago. the answer is "NO"!
    The JTAG interface portion is standard but the software and hardware to the JTAG interface is not.
  17. Like
    kenemon reacted to gwdeveloper in SimpiciTI Tutorial for CC2500   
    Hello KB.
    There shouldn't be any code size violations with the demo of CCS. The demo TX program compiles to about 8.5K which is well under the 16K limit of CCS.
    If you're using IAR Kickstart, you'll run out of room at 4K. Also, the bsp for the G2553 I uploaded will only work in the CCS version of SimpliciTI. IAR's version has different declarations for the interrupts and variables.
  18. Like
    kenemon reacted to voelker in Launchpad TB6612FNG Motor Driver   
    Sorry for the bad ASCII schematic. In fact the output pin of your uc is connected directly to AIN1 and to AIN2 through an inverter (the dot on my ascii schematic). I personnaly use a single NPN transistor to make the inverter. You are right that it decreases the speed resolution, and it makes it not linear. But this method not only saves pins, it is also said to give better torque performance. I have tested this design with the MSP430g2231 + L293D for a balancing bot and it works well (even if the bot cannot keep balance at the time ...).
  19. Like
    kenemon reacted to cde in Round PCB's   
    Afaik, and this is 3rd hand knowledge, most pcb services dont like cutouts like that. If the center is supposed to drop off, it will reject it. Keep a little tab on the circle to keep it attached, and cut it off yourself later on.
  20. Like
    kenemon got a reaction from bluehash in TI motor driver PCB using "PowerPad" heatsink   
    Hi All,
    Thought that I would share a TI motor driver PCB breakout, inspired by GW. It is made for the DRV8833 dual H-bridge stepper/dual brushed PWM controlled IC. Using the PowerPad heatsink technology, this baby should handle the larger gearhead motors (it worked for my solar tracker). It is rated at 2A. I used the msp430g2231 for PWM control. I also made the bottom a huge heatsink if you can see through the purple haze. Subliminally, I cant decide if I am a bigger NW or U of I fan (being a CU alum??).

  21. Like
    kenemon got a reaction from bluehash in ProFLEX01 Eagle library   
    I was kind of stuck in a thinking rut regarding TI's power pad technology. It was my intent to provide ventilation, or in the case of power pads, freedom to solder the bottom without using a toaster oven. I think it will help cool it down, but not as much as a copper heatsink would...
    Update: The hole works nice for tape during reflow action
  22. Like
    kenemon reacted to bluehash in stepper motor code   
    Looks like a bipolar motor. Can you at "least feel" any step when you power subsequent lines.

  23. Like
    kenemon reacted to oPossum in stepper motor code   
    Concurrent drive of 3 steppers
    This is for "smart" controllers with step/direction inputs, but it could easily be adapted for "dumb" H-Bridge controllers.
  24. Like
    kenemon reacted to zeke in stepper motor code   
    I did a little research tonight and stumbled across an App Note from TI.
    Check out MSP430 Stepper Motor Controller:
    - App Note
    - source code
    There's tons of stepper motor discussions out there. The software on all of them seem to be similar but the driver hardware isn't consistently the same. So make sure you design your circuit to handle the current that your motor will require.
  25. Like
    kenemon reacted to DanAndDusty in stepper motor code   
    A lot depends on the motors you have. For example I have played (briefly) with steppers, ensuring I can drive them. All I used was a 430 and a ULN2803 (Darlington Transistor Array). The 2803 has enough pins to drive 2 of the motors I was playing with and also has the suppression diode to stop the magnetic field collapse turning me into on unhappy expermienter.
    The motors were scavenged salvaged from an old HP printer. From the research I did they look like unipolar motors. I just had a 4 pins from the 430 taken to the inputs of the 2803. The outputs from the 2803 were used to sink current from the pins on the motor. I numbered the pins 1-4 (using a multimeter and PSU to work out the common and the pin order).
    My code simply had a timer ISR that walked a bit down the 4 pins. To change direction I walked the bit in the opposite way.
    As I say these were unipolar motors and so I didn't have the polarity to worry about just the sequencing and so the parts needed were minimal.
    Some pages I found useful were...
    If you already have motors you want to drive, the first thing you have to do is work out what you have and how they need to be driven. If you have yet to select your motor then you need to work out what matters to you more.
    I have looked into bipolar and unipolar only so can't comment on the other types.. but I gather that the main differences are :-
    unipolar is easier on the hardware but has less torque for a given size.
    Bipolar needs more complex hardware (H bridge drivers) but has more power for a given size of motor.
    All the printers Ive smashed to pieces lovingly disassembled have used unipolar motors so I have a little stock of them built up.
    Hope this helps.
  • Create New...