Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by rampadc

  1. I'm trying to get some of Energia's digital pins functions to work with Olimex's MSP430-T5510, which uses a MSP430F5510 but I'm running into a bit of a pickle with a linking error. I've included the source file. Can you please have a look at it and see how including #include guards doesn't solve the problem? #10010 errors encountered during linking; #10056 symbol "port_to_output" redefined: first defined in "./DigitalPinsMap/PinFunctions.obj"; redefined in "./main.obj" #10056 symbol "port_to_dir" redefined: first defined in "./DigitalPinsMap/PinFunctions.obj"; redefined in "./main.obj" #1
  2. Thanks for pointing that out. No biggie then. Type-casting should cast 8-bit pointers to 16-bit pointers well enough.
  3. Thanks for the code it works beautifully. Assuming my C understanding is up to par, (unsigned char *) is a 8-bit pointer. I tried to change "volatile unsigned char *" to "volatile uint16_t" and "volatile unsigned int *", which are 16-bit pointer but CCS complains in both cases that the parameter have type unsigned char *. Do you know why that is the case?
  4. Hi, is it possible to pass ports around as parameters in functions? Reason I'm asking is because in TI's USB Keyboard application note source code (SLAA0514_SW), it has P2OUT defined as #define KSO0_PORT_2 ((uint16_t) &P2OUT) /*! KSO0 Port */ which is stored in an array to be used later. const USBKBD_Port_t USBKBD_DKS_DSO[KSO_PINS] = { { KSO0_PORT_2, KSO0_2_0}, //... I tried to use void goHigh(uint16_t *dir, uint16_t *out, unsigned int bit) and passed in goHigh(P1DIR, P1OUT, BIT0) but CCS corrected me to use unsigned char instead. It compiled and downloaded fine but t
  5. Thanks. It makes a lot more sense now. I didn't notice SELREF__REFOCLK holds the same value as SELREF_2.
  6. I can't use assembly language. It boils my brain, but I'll try to get it. I've read through the Programming guide and looked at the traditional USB examples, ie. mouse and keyboard. So far I have a few questions: 1. Is usbConstructs' header and implementation file, usbEventHandling.c compiled with the project? I can't see any #include regarding those 3 in main.c but the programming guide has the code in usbEventHandling.c inside main.c so I assume it gets linked somehow. 2. In Init_Clock() (mouse and keyboard example), UCSCTL3 = (UCSCTL3 & ~(SELREF_7)) | (SELREF__REFOCLK); UCSCTL
  7. Thanks for the interrupt. That fixes the flickering problem.
  8. Hi, I'm writing display functions that will display an unsigned integer or a float on a four digit seven segment display with the MSP430 launchpad and I'm running into a problem. In the infinite 'for' loop, displaying a number works fine if it's only display one number: int counter = 100; for(; { displayUint(counter); //a function in the code } However, if counter is to increased, the first digit of the 4 digit remains brightly lit while other digits blinks very quickly. int counter = 100; for(; { displayUint(counter++); delay(1000); //delay 1 second } Schematic of circu
  9. Is there a resource more MSP430 specific?
  10. Thank you. I shall have a look at it.
  11. I'm working on a composite HID-HID USB device - keyboard and mouse. I've been reading through: - TI's Programmer's Guide to MSP430 USB API Stack (up to API's tables and descriptions) - USB Complete 3rd edition (just starting) - USB keyboard example - USB in a nutshell (half way) I find this very broad, useful and informative, but very broad. So I'm just wondering, is there a more compact learning resource available? The closest thing I've found is MSP430 F5xx USB Training but links to code and training presentation are broken.
  12. Hey Rob, and mods, will the boards ever be available in store again? Hope this isn't counted as an old thread.
  13. Thanks for the reply. It's working. While debugging, is there a way the debugger can update the register values of the MSP430 during runtime instead of updating them while the debugging is paused?
  14. I'm learning how to use the button on the TI Launchpad with MSP430G2553 and the button doesn't seem to work with this code (or any other codes involving using buttons) with my 2 Launchpad boards. I'm not sure if there's something wrong my the IDE or my computer. Here's the code I'm trying with. Do tell me if it works for you. #include <msp430.h> /* * Test when a button is pressed with polling */ #define GREEN BIT6 #define RED BIT0 void flash(unsigned int); int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1OUT = 0; P1DIR |= RED + GREEN; //output at P1.0 and
  • Create New...