Jump to content

jazz

Members
  • Content Count

    442
  • Joined

  • Last visited

  • Days Won

    21

Reputation Activity

  1. Like
    jazz got a reaction from jpnorair in MSP430 with USB support?   
    I done my in assembler, stable & workable CDC, and it is under 2.7KB, on MSP430F5508. Unfortunately (under Win32) there is problem (can transfer only one packet per frame if the packet size is less than 64 bytes) with (original) usbser.sys, and now I am trying with winusb.sys.
  2. Like
    jazz got a reaction from bluehash in Timer based Stepper driver   
    All my software regarding uC's is done in assembler. Don't have any problems in switching between different platforms. If you need speed (like in this project) there is no compiler that will bring you there. Optimized algorithm (main task) was done in DS89C4x0 assembler, and later rewriting to MSP430 assembler was easy job.
     
    DS89C4x0 is 8-bit uC, and all numeric operation are going over one register, so I decide to try MSP430F550x later, and left the ARM as last choice. MSP430F550x is fast enough and have USB connection (or fast uart). Target is reached, no need for ARM at all.
     
    If you check PCB milling videos on youtube, you can see the (low) speed of this devices, especially when the tool is going around the holes (processing big number of G code commands). This (low) speed is not related to steeper motors, it is related to slow software.
  3. Like
    jazz got a reaction from Nytblade in Timer based Stepper driver   
    I am working on CNC (still software part only) for PCB's. My PC interface application load G files exported from Eagle, and use MSP430F55x with DRV8811 (http://gandalf.zemri...or_control.html) for stepper control. There are 2 Z tools (drill/mill). No need for tool change stoppage, so all job can be completed without user intervention. PC sending simplified G-Code commands to uC, and than uC informs back all the time PC about (all motors) stepping, so there is live animation on the screen about changing of all positions (X, Y, ZM, ZD). If something goes wrong on uC side, PC stops the job.
     
    There is no control panel (leds/buttons) that can be more user friendly than PC interface. And my system will not have any of those, only on/off (or emergency button) and limiter switches.
     
    uC side is written and optimized in assembler (min resolution 0.1 um), and it is fast. If you want to run any kind of G-Code interpreter on uC (100 MHz) side, it will be slow. I tried it at the beginning and late gave up. If you are using uart standard 115200 bps for data exchange, it will be slow again.
     
     

  4. Like
    jazz got a reaction from Nytblade in Timer based Stepper driver   
    I didn't find any user friendly application regarding PCB milling/drilling topic, and started 3 years ago to work on my own. One day, when the first board will be produced, I will put details about project on 43oh forum, because it is based on MSP430F550x. It will not be open source project, but I will explain PC/uC/stepper used interface (it will be open), give answer to all questions regarding the topic.
     
    As input for PC interface application (picture posted upper), milling "singlesided.bot.etch.tap" and drilling "singlesided.bot.drill.tap" G files (exported from eagle) are used. On the right side of window, there are 2 tolls, for milling (upper) and drilling (lower). On the main part is small white dot that shows X/Y position, and on the tolls part is Z position. I made the screen shoot during milling, so milling tool is scratching the board (red scrached path, and blue will be), and drilling tool is in up position and waiting (holes on board are marked with blue plus). After one G file is processed, job with next file is started.
     
    PC interface application is running on Win XP and it is connected by USB to control board (only MSP430F550x with few parts). Control board is powered by USB and have standard stepper drive connection (STEP, DIR, GND), so it will be possible to use any existing CNC device, just by reconnecting stepper drive connectors from original control board to MSP430F550x board.
     
    All not X/Y/Z command regarding motors from G files are ignored, and there is configuration setup. Ratio is motor resolution value, um needed for one step. So when in G file X change in +/- 5.1 um, motor for X axis will made one fwd/bck step. Delay is used to defined minimum time between 2 steps, or stepper frequency/speed. Delay is separated, and it can be used for example, for drilling tool to go faster up than down, or for milling to go slower when board is milling and faster when toll is moving over the board without milling. There are 2 tolls on Z axis (with at least different X or Y position), and offset is used for zeroing (local X/Y/Z zero position of each tool related to real zero position). For testing and finding all configuration values calibration part is used. My target was to be able to use 4 different steppers for X/Y/ZM/ZD (different number of steps per revolution, and different speed) without any problems.
     

     
    I was working a lot with DS89C4x0 (3 years ago), and started uC code with DS89C4x0 in assembler. Minimum resolution was 0.1 um, and it was working with 3 bytes numbers (for X/Y/Z). DS89C4x0 at 32 MHz, was communicating with PC by serial connection on 2 Mbps (PL2303HXD was used). At the end system was working OK, but I was looking for higher speed and direct USB connection, so later switched to MSP430F550x (0.1 um precision, 4 bytes numbers for X/Y/Z). MSP430F550x is able to process (test mode without running motors using 921600 bps serial connection) sample PCB (upper picture) in 30 seconds.
  5. Like
    jazz got a reaction from bluehash in stm32f4 read fast parallel   
    I don't know stm32f4 (and how fast it is), but in general, if the signal is coming (in any format) all the time with constant clk, (usually) it is faster if reading is done in code directly (infinite loop if uC is not working on something else), because for (serving) interrupt some more clk cycles are needed.
     
    For example, if I need to read fast parallel data signal that coming on port, will put checking for clk line, and when the signal is clocked will deal with data:
     

    Loop1 bit.b #CLK_BIT, &PORT ; checking the CLK line jnc Loop1 ; CLK line not OK => signal not ready ; signal on PORT is OK => processing... Loop2 bit.b #CLK_BIT, &PORT ; checking the CLK line jc Loop2 ; CLK didn't change => wait jnc Loop1 ; new data coming
  6. Like
    jazz reacted to Philipp in $4.99 Stellaris (Cortex-M4) LaunchPad   
    FYI: Some kind of self-promotion
    I modified my stellaris Launchpad to work with a single-cell LiPo battery.
    Turned out that there is some kind of research involved, instead of just plugging it in.
    http://blog.psten.de/post/fuel-for-the-stellaris-rocket

  7. Like
    jazz reacted to fatihinanc in Launchpad as external programmer   
    I have both of v1.3 and v1.4 version LP's and I have found a wiki page about updating eZ430.
    I've updated my LP's using FET430 UIF and now both of LP's, programing F5x devices too fast.
    And after the programming Flash(Quick Download in IAR, without Debug) the Reset button is works. In the older revision, I have to unplug and plug the LaunchPad for running the downloaded code.
    I strongly recommend it
     
    Specifications of eZ430 Firmware V30394216 Release Date: 11/09/2011
     
    Supported Features:

    LPMx.5 debug support( if device supports this)
    FRAM memory technology support
    FR5739 MPU handling
    FastEasy: fast FLASH and FRAM programming
     
    Supported Devices:

    CC430 Family
    FR573x Family
    5510 Family
    5529 Family
    5172 Family
    5438 Family
    5438A Family
    2GXX Family
    2xx Family
     
    Supported Tools:

    CC430-EXP
    FR5739-EXP
    5529-EXP
    Fossil Watch
    Chronos Watch
    Launchpad
    ez430-2500RF
     
    This is the link : http://processors.wiki.ti.com/index.php/EZ430_Emulator_Upgrade
  8. Like
    jazz got a reaction from mixographer in Serial (without emulation side)?   
    My point is... why using something (standard MAX232 chip) that maybe works OK with low voltage (close to 3V), when you can use something (MAX3232 or any other 3V rated chip with enough drv/rec) that is working OK for sure with low voltage (close to 3V by data sheet spec, and can go under). Don't see any reason for connecting MAX chip to any other supply voltage (to 5V why?), then MSP430 supply (battery, close to 3V).
     
    As I understood, in this topic user want to use (battery powered standalone device) MSP430 with MAX chip for sending data to POS. There is problem in RS232 interface between MSP430 and POS, and there is no reason for putting FTDI chip in this story. Or maybe I don't understand the problem, don't know?
  9. Like
    jazz got a reaction from NirKe in Uart configurator   
    I was playing last days with MSP5xx UART, and every time after changing baud rate, need to calculate configuration again, and again, and again...
     
    I write small program for making configuration depending on clock and baud rate. After generation, just press mouse button on first/second listing (nothing will happen) and use [CTRL]+[C] for copy listing to clipboard.
     

    MSP430UartCalc.rar
  10. Like
    jazz reacted to oPossum in USCI UART bit rate setting   
    The MSP430x2xx Family User's Guide has several forumulas and tables for UART bit rate calculation. Makes it look more complicated than it is. Here is simple code to setup the bit rate divisor and modulator (for oversampling mode).
     
    First you need to know the SMCLK frequency and the desired bit rate.

    const unsigned long smclk_freq = 16000000; // SMCLK frequency in hertz const unsigned long bps = 19200; // Async serial bit rate Then a 20 bit divisor value can be calculated.
    const unsigned long brd = (smclk_freq + (bps >> 1)) / bps; // Bit rate divisor Shift and mask to setup the registers.
    UCA0BR1 = (brd >> 12) & 0xFF; // High byte of whole divisor UCA0BR0 = (brd >> 4) & 0xFF; // Low byte of whole divisor UCA0MCTL = ((brd << 4) & 0xF0) | UCOS16; // Fractional divisor, oversampling mode That's it! 
    A function for UART setup at a specified bit rate...

    const unsigned long smclk_freq = 16000000; // SMCLK frequency in hertz void setup_UART(const unsigned long bps) // Async serial bit rate { const unsigned long brd = (smclk_freq + (bps >> 1)) / bps; // Bit rate divisor UCA0CTL1 = UCSWRST; // Hold USCI in reset to allow configuration UCA0CTL0 = 0; // No parity, LSB first, 8 bits, one stop bit, UART (async) UCA0BR1 = (brd >> 12) & 0xFF; // High byte of whole divisor UCA0BR0 = (brd >> 4) & 0xFF; // Low byte of whole divisor UCA0MCTL = ((brd << 4) & 0xF0) | UCOS16; // Fractional divisor, oversampling mode UCA0CTL1 = UCSSEL_2; // Use SMCLK for bit rate generator, release reset }
  11. Like
    jazz got a reaction from Soho in Uart configurator   
    I was playing last days with MSP5xx UART, and every time after changing baud rate, need to calculate configuration again, and again, and again...
     
    I write small program for making configuration depending on clock and baud rate. After generation, just press mouse button on first/second listing (nothing will happen) and use [CTRL]+[C] for copy listing to clipboard.
     

    MSP430UartCalc.rar
  12. Like
    jazz reacted to acabello in Received 2 Stella's, NOW TO DESOLDER THE HEADERS!   
    Stellaris LM4F120 LaunchPad Debug How To
     
    http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Debug_How_To
     
    Use the following steps to use the ICDI to program and debug an off-board device.
    Remove the power jumper located just below the green power present indicator LED. This guarantees that the on board LM4F120H5QR is not corrupted by the debug signals. It also prevents the LM4F120H5QR from interfering with the debug signals.
    Connect the JTAG signals to your target processor.
    Connect a common ground reference between the two systems.
    Optionally connect the RXD and TXD pins to connect your target UART to the ICDI virtual serial port.

    Your ICDI is now ready to perform JTAG operations on the off board target processor.
  13. Like
    jazz got a reaction from jsolarski in Uart configurator   
    I was playing last days with MSP5xx UART, and every time after changing baud rate, need to calculate configuration again, and again, and again...
     
    I write small program for making configuration depending on clock and baud rate. After generation, just press mouse button on first/second listing (nothing will happen) and use [CTRL]+[C] for copy listing to clipboard.
     

    MSP430UartCalc.rar
  14. Like
    jazz reacted to RobG in Received 2 Stella's, NOW TO DESOLDER THE HEADERS!   
    Done replacing headers, very easy job.
    First, crush the plastic, then desolder each pin one by one.
    Stacking header pins are flat so they are coming out pretty easy and without any damage to pads.

  15. Like
    jazz got a reaction from RobG in Best information for those new to the MSP430?   
    If you have board based on MSP430F5508, but can't download (even) blink led example firmware using TI USB BSL flasher, don't worry. With your board everything is OK. Everything is OK with flasher, too.
     

     
    TI prepared examples for MSP430F5529, and because of this none of them will work with MSP430F5508 (blink LED example will work with MSP40F5510). If you have XTAL2 with different frequency than one on TI MSP430F5529 evaluation board, USB (CDC/HID) examples will not work with your MSP430F5529, too.
     
    So, for the first test just select your firmware (prepared for uC used by you) in TI txt format and flash it. :thumbup:
  16. Like
    jazz got a reaction from RobG in Software debugging without hardware tools   
    This is for assembler programmers, way of debugging based on software without any hardware tools (only uC). So if you are programming MSP430 with C, playing in (launchpad) lego world, this is not for you.
     
    I will not publish complete source here, but will introduce idea, and help someone to build it's own version (not only for MSP430).
     
    I was working (before MSP430) on some other uC that don't have debugging interface (like MSP430), and there is no nice way for checking the code.
     
    There was (for some uC) debugging based on inserting software layer under the user program, or only adding some software around breakpoints. And than this special software inside uC was communicating with debugging hardware, or only with PC application. Big minus for debugging on this (only possible) way was in losing some flash/ram memory blocks, original vector table or registers, because debugger was using them for itself.
     
    All uC have (at least one) uart port, or it can be created (by software) if not exist. My idea was to use one uart for uC/PC main application, and another uart for uC/PC debugging. Debugging function are placed in separate file and just in lined in main assembler source (#include "dbg_uart.s43"). If debugging in main file is enabled (#define DBG_UART) also will be enabled all debugging functions (#ifdef DBG_UART). If debugging in main file is disabled, produced program (final release) will be in original form, without any debugging part.
     
    I made mine own BLS version, and I use it not only for flashing, but also for standard MSP430/PC uart communication when I need it. It is based on MAX3243E (SOIC) from TI, and placed inside DB9 connector.
     

     

  17. Like
    jazz got a reaction from petus in Uart configurator   
    I was playing last days with MSP5xx UART, and every time after changing baud rate, need to calculate configuration again, and again, and again...
     
    I write small program for making configuration depending on clock and baud rate. After generation, just press mouse button on first/second listing (nothing will happen) and use [CTRL]+[C] for copy listing to clipboard.
     

    MSP430UartCalc.rar
  18. Like
    jazz got a reaction from turd in Uart configurator   
    I was playing last days with MSP5xx UART, and every time after changing baud rate, need to calculate configuration again, and again, and again...
     
    I write small program for making configuration depending on clock and baud rate. After generation, just press mouse button on first/second listing (nothing will happen) and use [CTRL]+[C] for copy listing to clipboard.
     

    MSP430UartCalc.rar
×
×
  • Create New...