Jump to content
43oh

hawwwran

Members
  • Content Count

    29
  • Joined

  • Last visited

Everything posted by hawwwran

  1. I'm not able to run the demo code as parasitic. What should I do to make it working? Thank you
  2. Hello. I have a problem with timers. I would like to use the longdelay function above, but I use 2452 chip, not the 2553 and if I try to compile it, energia says "TIMER1_A0_VECTOR was not declared in ths scope"... Could someone rewrite the code to work with MSP430G2452? Thank you
  3. Now it makes complete sense. Which means that for me (with MSP430G2553) both devices we are talking about are the same for me, only pins TXD and RXD are useful for me for serial communication, but for the programming stuff I have to use the Launchpad's top part as I use it now. OK, that's not problem. I just like to know stuff. Thank you
  4. I know that, I use it that way, I even splitted the board for that purpose, but it's not effective. I can buy those devices above for about $2 each, that would be much better solution. And as a note, you don't actually need to connect the TXD and RXD to programm it. - Ok, so I cannot use those devices above, because they are not programmers with JTAG/SBW capability. I can use them for fine PC to MSP serial communication. - Now question about the first red one from sparkfun... What are those CTS and DTR pins good for when they do not provide JTAG?
  5. I'm noob in this area so forgive me my silly and repetitive questions. - I get now the difference between the devices RST and DTR, thank you mbeals - I still don't really understand how the programming works. I know that launchpad (the top part) is using RST and TEST pins to programm the MSP. Is the launchpad's programmer somehow transforming the TXD RXD communication to those TEST and RST pins to programm the MSP or is it possible to find those pins (TEST RST) as output on the CP2102 to point them to TEST and RST on MSP to programm it? My point is, that I want to free myself from having
  6. Hello again. Now I have this question: I'm awaiting this device to come soon and I don't get one thing... the RST line. What is it for? But my question is little bit more complicated. This device uses chip CP2102 so I searched little bit and found few articles how to take out DTR instead of the RST. But, as I found out.. for MSP430 it seems the DTR is usualy connected to RST pin, so what the RST on the device stands for? Here is the article how to bring the DTR out instead of the RST: http://jimlaurwilliams.org/wordpress/?p=999 And what I would be glad to do: to programm the MSP430 us
  7. Oh, I think I get it now! So the RXD and TXD jumpers are not bridges, but switches. So I drawed little diagram how I think it's connected to work like that. I just had to, to be calm :-) Thanks for help
  8. So you say, that connecting TXD and RXD pins from MSP to the device will allow me to communicate propperly the same as launchpad do? So my question is, why do I use launchpad with disabled TXD and RXD pins on top? I mean I have the jumpers horizontaly for SW UART, but I don't know what the SW UART actualy means... if I connect MSP's TXD and RXD pins, then it uses RST and TEST to communicate? I don't understand the mechanism how it works.
  9. Another question about those devices. If I'm right, connecting the first (FTDI, red, sparkfun) one means connect it like this: device msp ------------------ dtr -> rst (reset) rxi -> rxd txo -> txd cts -> tst (test) The second one (TTL, blue) ------------------------------------ device msp ------------------ r -> rxd t -> txd Now my questions are: - am I right about the connection? - Will the first one work just like the launchpad's serial communication using "Serial.print();" in Energia? - Will the sec
  10. I ordered both types from china for $5 ftdi and $2 the ttl one. And both of them capable of 3.3V and 5V. The TTL one even simultaneously. So, there is literally no difference (do not count the drivers)? And yes, sparkfun has terrible prices :-(
  11. Hello, I found some devices which should allow me to connect naked MSP430G2553 chip to PC over USB. But here is one problem I don't really understand. I found devices with FTDI chip (I know it's a brand name) and devices which I found under "TTL UART" or "USB to TTL". Here is link to the FTDI one: https://www.sparkfun.com/products/9873 Here is link to the TTL one: http://dx.com/p/usb-2-0-to-ttl-uart-5-pin-cp2102-module-serial-converter-blue-152317 So, my question is: is there any difference between those two? Because there is huge difference in price. Thanks for replies
  12. I'm afraid I don't understand. Could you post working usci isr handler file? Or should I read your fix again to understand it better?
  13. With this one it does not work (restart of energia needed): #include "Energia.h" #if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_EUSCI_A0__) #include "usci_isr_handler.h" /* This dummy function ensures that, when called from any module that * is interested in having the USCIAB0TX_VECTOR and USCIAB0TX_VECTOR * installed, the linker won't strip the vectors.*/ void usci_isr_install(){} #if defined(__MSP430_HAS_EUSCI_A0__) __attribute__((interrupt(USCI_A0_VECTOR))) void USCIA0_ISR(void) { switch ( UCA0IV ) { case USCI_UART_UCRXIFG: uart_rx_isr(); break; case USCI_UART_
  14. And really simple one: char chr; void setup() { Serial.begin(9600); } void loop() { while (Serial.available() > 0) { // while there are data on serial input chr = Serial.read(); // fill the byte on input into char variable Serial.print(chr); // print to serial } }
  15. here is the code. With the usci_isr_handler fix it prints nothing, without it it prints everithing sent to the Serial from PC ending with "." int incomingByte = 0; // for incoming serial data char chr='.'; // var to store char from serial port char string2[16]; // command string (maximum length of the command is set to 16 bytes) int string2idx = 0; char commandDivider='.'; // char which devides commands int moveDelay = 30; // delay between moves. Usable for slowing down the motor movements int command_int=0; void setup() // run once, when th
  16. I found big problem with Serial. I have implemented the Spirilis's fix to the usci_isr_handler.c so Serial.print(); works. But with the fix Serial.read() is not working. So I'm not able to read from serial at all. Any Idea how to solve this? Thank you
  17. Wow! Ok, 6 months is enough to not calculate it exactly. Now I hope someone with experience in the sleep function in energia will help me with the code. It's just a test of the power possibilities of the NRF and MSP and way how to learn the sleeping.
  18. I have a question for you who know how to calculate it. I woud like to make small device which would periodically (every 10s) sent (let's say 5 bytes if it's important). I would use MCU MSP430G2553 (or better G2452?) My question is, how long will it work on battery CR2032 3V 220mAh? I'm planning to use deepsleep and such to maximize the time, but I have no idea what time it could be, I don't know the consumption of NRF24 and the G2553 (or G2452) and don't know how to calculate it. EDIT: Could someone show me an example how to sleep G2553 for 10s, blink LED and sleep again? Than
  19. Here's my code for everyone who would like test it: Sender device periodically checks all addresses from dev-a to dev-z and all found devices prints to serial Receiver device is listening on it's address and if receives the right command, it send's back identification string which should be printed to serial by sender device Sender device code #include "Enrf24.h" #include "nRF24L01.h" #include <string.h> #include <SPI.h> Enrf24 radio(P2_0, P2_1, P2_2); // P2.0=CE, P2.1=CSN, P2.2=IRQ const char IDENTIFY=1; char rxaddr[] = {'d','e','v','-','0'}; char txaddr[] = {'d'
  20. I tried put delays to different places with no result. On device - wait 100ms before sending reply on sender - wait 500ms in the wait() before giving it up - wait 500ms before the wait() - wait 500ms after the wait() before .read nothing helped, still the same problem OK [dev-a] - CameraMover OK #2[dev-g] - Demo device #1 OK [dev-a] - CameraMover OK #2[dev-g] - Demo device #1 OK [dev-a] - CameraMover OK #2[dev-g] - Demo device #1 OK [dev-a] - CameraMover OK #2[dev-g] - Demo device #1 OK [dev-a] - CameraMover OK #2[dev-g] - Demo device #1 OK [
  21. So, I turned off the auto ACK and changed the check for lastTXfailed to check what address the message was sent to, because I know the two which exists. That means, that the program is doing the same... sending message to all addresses, but it's waiting for the response only for the two of them. And the result is, that it's working well OK [dev-a] - CameraMover OK [dev-g] - Demo device #1 OK [dev-a] - CameraMover OK [dev-g] - Demo device #1 OK [dev-a] - CameraMover OK [dev-g] - Demo device #1 OK [dev-a] - CameraMover OK [dev-g] - Demo device #1
  22. Hi. The auto ACK is essential for me. I use MSP430G2553 If you are talking about the 10ms in the wait() waiting for receiving message from device after confirmed package was sent, then I think it's not the problem. Don't know why or how, but even 1ms wait works the same and 1000ms as well. If the message is received, the delta_time is 0ms. If it does the "bug", it waits all 1000ms (or other time whatever I set) and still receive no data. So my Idea is... the problem has to be that the problem is on the side of the device (but auto ack says it's delivered) or on sender (discarded received
  23. But I found one problem I don't understand. If there are more devices (two), every second device is marked ad non responding. It does not seem to be problem of the device, but the finder. It simply looks, that sometimes, the message is not sent, but on the sender device it looks like it was, so it is waiting for the response, but the response does not happen. But next time it's ok and then it's not and so on. Any idea?
  24. If someone else is interested in scanning for active devices on known array of addresses, here is my working solution: Device finder code: #include "Enrf24.h" #include "nRF24L01.h" #include <string.h> #include <SPI.h> Enrf24 radio(P2_0, P2_1, P2_2); // P2.0=CE, P2.1=CSN, P2.2=IRQ const char IDENTIFY=1; char rxaddr[] = {'d','e','v','-','0'}; // address of commander (note that it's out of sequence of device addresses) char txaddr[] = {'d','e','v','-','a'}; // address of the first device unsigned long mil; unsigned long prev_time; char ch='a'; // set first "address" int v
  25. Great! So, let's say I plan to have maximum 20 devices (in fact about five, but just to be sure). That makes an alphabet enough big to use it as ID's like this to go through ids from dev-a to dev-z to make the addresses easy to remember. const uint8_t txaddr[] = "dev-a"; . . . for(uint8_t i='a'; i<='z'; i++) { txaddr[4]=i radio.setTXaddress(txaddr); } . . . and of course on the RX side (for example) const uint8_t rxaddr[] = "dev-a"; So you say it's valid? Thank you
×
×
  • Create New...