Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by rampadc

  1. Edit: It works with the example so I just took that example and use it.
  2. How do you send reports to the computer when using composite HID+HID? In the Descriptor Tool, I have the mouse as interface 0 and keyboard as interface 1. When enumerated, the device polls for mouse movements and scan the keys, then send the reports to the computer. case ST_ENUM_ACTIVE: while(1) { pollMouse(); //polls for mouse movement pollKeyboard(); //scan keyboard matrix sendKeyboardReport(); } void pollMouse(void) { //... prepare mouse report USBHID_sendReport((void *)&mouseReport, HID0_INTFNUM); } It doesn't work however. Even though there is mouse move
  3. That's alright. At least I have some sort of working code now, even though it only works at this one specific clock frequency but it does work with different development boards.
  4. Did you guys notice TI's selling their new MSP430F5529 USB Launchpad board? I found an old announcement back in 2012 on 43oh main page that TI's working on it but haven't seen any on it being sold. I just found out today and apparently it's sold out. :-( TI also changed the descriptor tool by making the interface a bit prettier but they removed the definition USB_MCLK_FREQ which will break all the code in their last USB API so now there's a new USB API 4.0 that requires CCS 5.5 to be installed, though there are workarounds so it will work with existing CCS.
  5. That's a great idea. Can you elaborate? Is it family specific? In the x5xx family guide, I only see UART, SPI, I2C mode availabe. How do you force the module to do some other modes? Other than that, I found out that the 3.3V-5V level converter was wired a bit incorrectly where some resistors which is connected to 5V are connected to 3.3V. Using another breadboard with separation on the power lines, the code for the FLL 8MHz works.
  6. Was it? Sorry if it wasn't clear. I was only using 2 lines. The 5510 I'm using only have one pair of TX and RX and I'd much rather use that for UART, but if nothing else works, maybe it's worth a try. By "done in hardware", do you mean the MSP430 has a module to do that or are you saying to adapt I2C or SPI to PS/2? About the delay, I don't think it's the case. I'm setting the clock to run from XT2 now and let's see if it works. Still, is there a way to output MCLK/SMCLK if there are no dedicated pins for those? I've used an oscilloscope to calibrate the microseconds, millise
  7. The code works if I place a breakpoint before reading data from the PS/2 so I placed a delay before each call and it seems to work now, but it may just be a fluke.
  8. That's probably the only way to do so right now. 38400 bps is for UART with the computer. If there is a less bit-bang way to do PS/2 with MSP430's UART/SPI/I2c module, that would be great but I've never pondered into the software behind those so I'm not sure if it's possible to do so.
  9. I'm running into a problem with interfacing a PS/2 mouse and I think the source of the problem is related to timing errors. My current setup is to have the PS/2 mouse data and clock line connected to a bidirectional MOSFET voltage level converter (http://www.hobbytronics.co.uk/mosfet-voltage-level-converter) into 2 pins on a 48-pin MSP430F5510. As for the code, I'm using Arduino's PS2Mouse library because it is known to work. It's probably bad practice but I wrote a digital I/O class similar to Energia to get the PS/2 library working (http://pastebin.com/Wkumn6v6) I've read Chapweske's wri
  10. That does it, or at least I think it does. Thank you.
  11. So I've read it and I understood how PS/2 works but I still think the problem is with the bidirectional circuitry. Without connecting the output of the circuit to the load, STATE MSP430 NO-LOAD High 3.3V 1.05V MSP430->5V High 3.49V 5V 5V->MSP430 Low 0V 0V MSP430->5V Low 0V 0V 5V->MSP430 However, when connecting the output of the circuit to an Arduino input with pull-up, outputing 0V from the MSP430 does not pull the line low. Has anyone done any work related to this topic that maybe able to help me?
  12. You guys are absolutely right. The problem was with the clock setup.
  13. I'm having a problem with setting voltage from the MSP430 to a 5V input line. I'm using the op-amp setup as specified in section 5.1 of TI's application report "Interfacing the 3V MSP430 to 5V Circuits" with a TLC27L4CN, R3=320k (220k+100k), R4=1M, R5=750k. Without connecting to +5V IO lines, logic levels are converted nicely on both sides, so by itself, it works. The problem starts as follows: The 5V input initially has a voltage of approximately 5V. MSP430 outputs logic low and the 5V logic should be pulled down to 0V but it doesn't. It stays at about 5V. If I remove the jumper line from
  14. Quick question. Now that UART is working, I copied the code for clocking, uart and line sending over to TI's USB mouse example. These are the changes made: VOID Init_Clock (VOID) { P5SEL |= 0x0C; //enable XT2 pins for F5529 UCSCTL3 = SELREF_2; // Set DCO FLL reference = REFO UCSCTL4 |= SELA_2; // Set ACLK = REFO UCSCTL0 = 0x0000; // Set lowest possible DCOx, MODx // Loop until XT1,XT2 & DCO stabilizes - In this case only DCO has to stabilize do { UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG); // Clear XT2,XT1,DCO fault fla
  15. I ran jsolarski's UART code from http://forum.43oh.com/topic/2863-sample-code-for-robs-f5510-usb-dev-board/?p=24604. It works perfectly. Well now I know TI example code was the problem. Thanks for the help guys.
  16. I'm going to get a frequency meter. I've modified the code, now using the 32kHz crystal as a clock source for FLL so I hope it will be more accurate (TI example). Though it's still not sending anything through. It would be great if you can help me spot the problem. #include <msp430.h> #include <string.h> #include "F5xx_F6xx_Core_Lib/HAL_UCS.h" #define CPU_F 8000000 void sendLine(char *); void sendByte(unsigned char); int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer //green LED on PJDIR |= BIT2; PJOUT |= BIT2; //output SMCLK P2D
  17. I shall have a look at them once I got home. This morning I tried using 2 Launchpad with one sending some text (1) and the other one (2) acts as a USB UART, and my computer picked up the lines just fine. What I did was: - Put a MSP430G2553 chip back into the sockets - Put TXD, RXD jumpers on the USB-UART Launchpad to horizontal (2) - Load TI's echo SMCLK 9600 UART program onto that Launchpad (2) - Connect transmitting Launchpad's TX (1) to this UART Launchpad, P1.1 (2) - Only connect USB to the Launchpad (2) and use jumpers to power Launchpad (1) So I guess it's a software error on t
  18. I still can't get it to work. TI examples on UART for 5510 don't work either. They seem to be written for the 552x instead. The TX/RX pins doesn't match up. I'm not sure whether it is the hardware or software. Does Olimex have someone here in 43oh or should I post something on their forum? They are very slow on replying though.
  19. Oh I want the MSP430F5510 to talk to the computer, I've already removed the MSP430G2553 from the Launchpad so the debugger don't get confused.
  20. I recently purchased a MSP430-T5510 board. It has RXD on P4.5 and TXD on P4.4, which has connection with pin 4 and 3 on the UEXT connector. I'm finding a way to use UART with this board since doing it via JTAG can't be done. With the following code: int main(void) { //REFO for ACLK, source for FLL UCSCTL3 |= SELREF_2; UCSCTL4 |= SELA_2; //set DCO frequency at 16MHz, so MCLK runs at 8MHz UCSCTL2 |= 245; //UART P4SEL |= BIT4 + BIT5; UCA0CTL1 |= UCSSEL_2; //SMCLK UCA0CTL0 &= ~UC7BIT; //8-bit //http://www.daycounter.com/Calcu
  21. Looking again at the USB Keyboard example from TI, I found that they cast 16-bit address to 8-bit to make it work as a general function: 1. Define a port address as a 16-bit integer x 2. Cast that 16-bit integer x as an 8-bit integer pointer 3. Use pointer to change port values For example: #define PORTJ_OUT ((uint16_t) &PJOUT) void portJPinToHigh(uint8_t pin) { uint8_t *port_out = (uint8_t *) PORT_OUT; *port_out |= pin; } I've tried this with a P4OUT and PJOUT, and they both works fine. Though I'm not sure yet how it works.
  22. Thank you. That is comprehensive explanation. So if I want to get a function to handle both lettered ports and numeric ports, how can I do so without type-casting?
  23. The error complains that the symbol is redefined in main.c. I found that if I removed the included header file that was causing the problem from the main.c source file, the error disappear so my guess was that the variable was not defined properly. Reading through C tutorials on scope and linkage, the recommended way to declare and define a global variable is as follows: For example, if I want to make a new constant integer variable called queues. The variable should be declared in a header file once and only once, and defined in a source file once: Header1.h //#include guards exter
  • Create New...