Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


terjeio last won the day on December 26 2017

terjeio had the most liked content!

About terjeio

  • Rank
    Level 1

Profile Information

  • Gender
  • Location
  • Interests
    Electronic design, motion control, programming
  • Github

Recent Profile Visitors

523 profile views
  1. MSP430F5529 and RFM12b used together

    Not always so, e.g.: 2 + 1 + 1 = 4, 2 | 1 | 1 = 3 I prefer to OR bitwise constants, adding them is not logical...
  2. IR remote library

    I have wirtten code for RC5 and NEC/Samsung decoding that may be of use. It is not written as an Energia library though - I am using CCS and DriverLib. I use it for my multimedia center so originally only for RC5 commands, I added Samsung (nearly same as NEC) decoding so I could use my TV remote for volume control as well as my dedicated RC5 based remote. The Samsung commands are translated to their RC5 equivalents. remote.zip
  3. MSP432P401R Remapping Pins

    @fmilburn It is brought out to JP4.1 as RTS for the backchannel UART so it is accessible if a jumper is removed (it is not in place on my LaunchPad and I cannot remember if I removed it earlier, I believe not). I have a black edition if that matters. Terje
  4. From assembler it can be seen as 16 or 20bit depending on the instruction set used - MSP430 or MSP430X, it has a 16/20bit ALU. I would guess a C-compiler will mix 16/20bit style instructions for speed if memory requirement is > 64K. The OP never mentioned if using C or assembler and what the value is needed for - printing? a calculation? store somewhere else (in a "variable")?. To load a 64bit value from consecutive words in memory into registers from assembler code register indirect adressing mode with auto increment is the easiest. Move the stack pointer into a register and add (or subtract?) the offset needed to reach the data and use it as the base (assuming the data lives in a stack frame with a fixed offset from the current stack pointer value). From C code use the * dereference operator to read from an address into a variable. It may be possible to read the data into separate registers from C as 16 bit values, but then you are at the mercy of the compiler. I have not looked into how to get at the stack pointer from C, doable? Use a global variable instead of picking it off the stack? A final note: I do not understand why loading into register(s) is required...
  5. MSP430F5529 and RFM12b used together

    I think I have spotted at least three mistakes when reading back the result: 1 . You shift the contents of P6IN the wrong way and do not mask the unwanted bits before or'ing with the result (assuming MSB is sent first). 2. You shift the result after adding a new bit, the shift should be done before adding it. 3. You deselect the device after reading the first bit (MSB) of the result. Move setting nSel high out of the loop. result <<= 1; result |= (P6IN >> 6) & 0x01; The code above migth work for reading the result. However, why not use one of the USCI modules for SPI instead of bitbanging? From a quick glance at the datasheet it seems you can use a fairly high data rate.
  6. RFC: CNC BoosterPack

    @bluehash Thanks. This is not a commercial project, only a small batch of boards will be made and my plan is to make a few available at cost. @jazz I am not sure I understand your point, the ICs will be run well below their max power rating and output transistors are placed close to the connectors so that the connector pins acts as heat sinks. The motor drivers will be the only components with significant power draw/dissipation, this may cause a bit of heating above ambient for the pcb tracks going to the motor connectors. Shorter tracks would be better but (IMO) lead to a more messy design. Also, when routing, I was a bit surprised that I ended up with relatively few vias and fairly clean ground planes. I could have dropped support for the MSP430F2955 launchpad to allow more flexible pin assignments and thus made routing easier. However, since I was able to make a driver for GRBL I wanted to add it. This also means the design follows the BoosterPack design guidelines more closely (but still not 100% compliant). Terje
  7. RFC: CNC BoosterPack

    I have recently been working on a CNC BoosterPack that I will make available on Github when completed later in the spring. Current specifications: Support for my HALified version of GRBL (based on 1.1), currently drivers has been made for MSP432 (black version), Tiva C and MSP430F2955. NOTE: firmware is built with CCS 6.1, MSP432 driver is 100% CMSIS based. Opto-coupled inputs, NC switches recommended. Opto-coupled outputs with 200mA open drain drive for spindle on, spindle direction, flood and mist. Can drive most relays and solenoids directly. Output section can be powered from internal 3V3 or 5V source, or from external source. If powered from external source outputs can be made opto-isolated via jumper setting. PWM-output for spindle speed currently directly connected to MCU pin (could be changed to open drain). I2C (IIC) interface with selectable voltage level (3V3 or 5V) via level shifter, dedicated interrupt input. I2C pinout compatible with my 4x4 keyboard project, supports jogging etc. Optional EEPROM for configuration settings for MCUs with no internal EEPROM. Polulu 8825 motor driver breakout board compatible. Fault signal routed to GPIO input. Considered for later revision: Break out SPI interface and add full support for Trinamic motor drivers. Optional (SPI) DAC for motor speed (laser power) control. This might require a 4-layer PCB and also solving the pinout cabal... --- Anything you want changed? Terje
  8. MSP430F5529 LPM Questions

    I have ported code from that application note to C, one version is available on github if of interest. I2C-interface-for-4x4-keyboard Terje
  9. msp430f447 tft lcd interface

    https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf Changing the code from SPI to parallel comms for an existing library could be the easiest way to get it working. Maybe there are libraries available utilizing parallel comms for diifferent MCUs that can be adapted without too much effort.
  10. Tiva Reset

    Sorry for beeing a bit terse again, OR'ing NVIC_APINT_VECTKEY with the bits you want to set is the trick to make it work since NVIC_APINT_VECTKEY is the "password" or "guard" bits to allow the other bits to be changed. My point was that some other registers are similarily protected so it is something to be generally aware of. Read the documentation carefully is my motto - and do not expect details like this to be found in the context where you might think it should be mentioned.
  11. Tiva Reset

    Some registers are "password" protected. From page 164, APINT-register description: VECTKEY: "This field is used to guard against accidental writes to this register. 0x05FA must be written to this field in order to change the bits in this register. On a read, 0xFA05 is returned." So if register writes does not work as expected this is something to keep in mind.
  12. I2C interface for 4x4 keyboard

    I2C interface for 4x4 keyboard with partial support for 2-key rollover and autorepeat. Based on a Texas Instruments MSP430G2553 processor, uses a GPIO pin for signalling keypress events to host. Example PCB is a KiCad project for the 20-pin DIP version MSP430G2553. https://github.com/terjeio/I2C-interface-for-4x4-keyboard I am using this to test jogging in my GRBL-port embedded in the CO2-laser controller firmware (for Tiva C) I am working on. I have left some code (#defined out) to show how 2-key rollover and autorepeat can be enabled for some keys. The hardware abstracted ARM GRBL-port and an example driver for the Tiva C LauncPad is also available on GitHub.
  13. I have not switched to CCS 7 yet, in CCS 6 you can find examples via View > Getting Started > Browse Examples - same in CCS 7? Since many MSP430 processors have limited resources I prefer to implement the interfaces myself, reusing snippets of code from earlier projects.
  14. Does port 6 support interrupts? - check the documentation for your processor. I know this is not always so for the processors I have used.
  15. What is the requirement which is not met? Bouncing issues? Button matrix scanning? You need to use NMI?