Jump to content
43oh

RROMANO001

Members
  • Content Count

    57
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    RROMANO001 got a reaction from agaelema in I2C scanner for 2553 & 5529   
    Actual out of box experience:
         I am new to Energia so I am still in the learning curve knee but about wire these are some FAQ or FIXUP:
     
     First attempt was not working, using an LCD bought from ebay wiring was not same as library example so take care when you use these devices, I wrote a pin pulser to be able to identify how pin where connected using a multimeter or one LED with series resistor. (sketch attached as file on PCF 8574[A])
     
     Wire is present on folder CORE, is required on folder WIRE to be attached as library, I placed for now a symbolic_link to original files and it cure both compile and library add too. Some library probably where developed on winzz so it suffer capitalization too on Linux and I suppose also on OSX, again link solved this problem before ask to cure problem.
     
     during test for learning how library work I wrote a scanner very similar to one found on this thread to see what return as error, no timeout is on library, transaction get not locking but deadloking in case of unresponsive bus.
     When P1.6 is Low Wire Library forever return 0 as if transaction was ok if no write and lock if no ack come back from device. This require more debugging inspection than just reading code.
     Wire.endTransmission(stop) default to true as from source overloading, using () version forever generate <I2C stop>.
     
     On launchpad P1.6 is attached green LED, this disturb I2C transaction and system forever hang or return OK, Logic analyser was reading ok but I suppose internal threshold is more higher than 1.8 volt and 1.9 where not enough. Seen observing LED glow and also attaching scope to measure bus parameter.
    Removing LED P1.6 Jumper scanner and other sketch I tested worked fine.
     
     LCD I bought on Ebay was not connected as from Library but I found was RS RW EN BL D4 D5 D6 D7, pulser can be useful to check how is connected, from china you get cheap items but at expense of our time.
     
    More to come when I better know forum and Energia.
    /* I2C Bit Pulse exerciser to identify pinout This sketch repeatedly pulse at 4 Second period every bit 5 time showing on serial console. example added 16 May 2015 by Roberto Romano modified by This example code is in the public domain. */ #include <Wire.h> #define I2CADDR 0x27 void setup() { // put your setup code here, to run once: Serial.begin(9600); // start serial for output Serial.println("I2C Pulser Begin"); Wire.begin(); // join i2c bus (address optional for master) } int errnum; void loop() { // put your main code here, to run repeatedly: Serial.println(); Wire.beginTransmission(I2CADDR); // Set and test Slave device Wire.write(0); errnum=Wire.endTransmission(); delay(5); Serial.print(" Errnum: "); Serial.print(errnum); if(errnum) else if(errnum) Serial.println(" -> I2C error!!!"); else { // Wire OK Serial.println(" -> OK"); for(int i=0;i<7;i++) { // bit scanner for loop Serial.print(" pulse on BIT: "); Serial.println(i); for(int j=0;j<5;j++) { // pulser loop Serial.print(" pulse High "); Serial.println(i); Wire.beginTransmission(I2CADDR); // Set and test Slave device Wire.write(1<<i); errnum=Wire.endTransmission(); delay(2000); Serial.print(" pulse Low "); Serial.println(i); Wire.beginTransmission(I2CADDR); // Set and test Slave device Wire.write(0); errnum=Wire.endTransmission(); delay(2000); } // pulser loop } // bit scanner for loop } // Wire OK }
  2. Like
    RROMANO001 reacted to yyrkoon in TI will no longer accept .edu addresses for samples   
    Is it just me, or are people getting a bit carried away with the term "Arduino" ?
     
     
  3. Like
    RROMANO001 reacted to eck in TI will no longer accept .edu addresses for samples   
    Most low end Cortex M0 and M3 chips aren't really that much more expensive if bought from e.g. Mouser vs from AliExpress. What comes to the boards, they can be usually recreated very easily if needed.
  4. Like
    RROMANO001 reacted to cde in TI will no longer accept .edu addresses for samples   
    Is teaching students to use unreliably sourced products wise and/or ethical? Won't that work against them in the field when they attempt to design based on unrealistic dev and production costs? Just a thought.
  5. Like
    RROMANO001 reacted to solipso in TI will no longer accept .edu addresses for samples   
    This is the exact board we choose as our learning platform. It's a small world!
  6. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    Didn't found much regarding topic, on web. There is USB UART bridge example from TI (CC1 from TI USB stack). Another one is from Atmel. Nothing special, but if somebody want to see it:
     
    AVR272: USB CDC Demonstration: UART to USB Bridge, on megaAVR with USB
    http://www.atmel.com/Images/doc7602.pdf
    http://www.atmel.com/Images/AVR272_USB_CDC_Virtual_Com_Port.zip
     
  7. Like
    RROMANO001 reacted to jpnorair in MSP430F550x based USB - UART bridge   
    Fine, but if you want to build a real product, you need to care.  If you want to build a hobbyist board with no warranty, then it really doesn't matter.
  8. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    SCLK is directly sourced (/1) from 24 Mhz XT2. XT1 is not used. Don't know about MSP430F550x UART internals (and don't care), but it can work on higher baud rates (2.5 Mbps) than it is specified in datasheet (1 Mbps) without problems. I made benchmark for sending to/from UART 2 MB of non-dummy data, where receiver was checking received data. If even one received byte (from 2 MB block) was wrong (different than expected), benchmark program will display error info about this. Also if received size is different from sent size (2 MB), again error will be displayed.
     
    When I completely finish bridge software, I will made final benchmark, and will put results here.
  9. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    I was playing few years ago with DS89C450 uart at high baud rate. Formula for baud rate was BR = SCLK / 16. With 32 MHz SCLK (8 MHz Quartz) it was able to transfer data at 2000000 bps, and overclocked to 40 MHz (10 Mhz Quartz) at 2500000 bps. It have only one common byte for TX/RX buffer (not two separate bytes like MSP430), but it was able to transfer data to/from PC (over PL2303HX bridge) at high rate without problems.

    I was little disappointed when I found datasheet info about 1 Mbps limitation for MSP430. Fortunately, it can go much higher. Today I made uart ping-pong test for send/receive big data size at once. I used my 2 MSP430F550x based bridges. Both boards are diy p2p (one with MSP430F5508, and another with MSP430F5510), with same 24 Mhz Quartz (same batch). I connected UCA1RXD/UCA1TXD lines (crossed, from one to another board) with short wires over 100 Ohm resistor. Algorithm for calculating BR/MCTL dividers was same on both sides, with same results, so basically error for uart transfer was close to zero. Result is here:
    2048 KB @ 2500000 bps Time 8312 ms Rate 252 KB/s  
    So, MSP430F550x uart can work at 2.5 Mbps like overclocked DS89C450, without problems. After going upper with baud rate, transfer was failing. Not sure if the reason for this is in USCI itself, or my bridge code limitation.
  10. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    My way has nothing in common with TI example. I am not using double buffering and DMA, because this will not improve anything. Timeout is not the problem because it is automatically calculated based on baud rate. With 24 MHz SCLK, and serial transfer of 10 bits (1 start bit, 8 data bits, 1 stop bit) it is close to:
    115200 bps ~ (10 bit / 115200 bps) = 86.806 us ~ TAxCCR0 = (24 MHz * 86.806 us) = 2083 921600 bps ~ (10 bit / 921600 bps) = 10.851 us ~ TAxCCR0 = (24 MHz * 10.851 us) = 260  
    First algorithm was based on collecting uart RX bytes in (circular) buffer (256 bytes). Than (part of) this buffer was copied to IEP buffer, and flushed with 64 bytes length or less bytes with timeout. Problem was on higher baud rate (1228800 bps), because it was not fast enough.
     
    Second algorithm was based on writing RX bytes directly to IEP buffer. With this one, problem was not in speed, but in too short buffer lenght (2 * 64 bytes), and USB was not having enough time (on higher baud rate) to accelerate (starting of few first packets).
     
    Now am I working on algorithm that is combination of this two, writing directly (with skipping) to big IEP buffer (1 KB), and flushing it with packets of 64 bytes, or less if timeout is reached.
  11. Like
    RROMANO001 reacted to jpnorair in MSP430F550x based USB - UART bridge   
    If you have an architecture loosely based on TI's library, just set the RX timer for ~50us each time you service the X/Y buffer or get the data detection event.  If the timer expires, it means the stream has stopped before the Y/X buffer (respectively) has filled.  I can tell you for certain that this strategy works (I have no benchmarks, but for transfers that are multiples of 64 bytes, there is no overhead).  You'll need also to send a stall command while waiting for the UART to finish, but I'm sure you knew that already.
  12. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    Easier part, MSP430 CDC -> UART side is done, and it is working OK. It is used OEP without double buffering, but with toggling 2 address/pointers (USBOEPBBAX). Code is fast enough, without impact on requested baud rate.

    Here are the results for MSP430 -> PL2303 uart transfer:
    512 KB @ 921600 bps Time 5672 ms Rate 92 KB/s 512 KB @ 1228800 bps Time 4266 ms Rate 123 KB/s 512 KB @ 1500000 bps Time 3485 ms Rate 150 KB/s
    Even it is specified in datasheet, and can be found on web, that MSP430 maximum baud rate is around 1 Mbps, didn't have any problems with testing till 1.5 Mbps. Going over this value cause transfer failures.
  13. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    Now, working on UART -> CDC side, and it will be hardest coded part in complete SBW programmer project. Making something like TI example, to exchange characters after pressed keyboard key between 2 terminal application is one thing, and making real bridge to work at 1228800 bps without any problems is something else.
  14. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    Just to have some orientation to transfer speed, I used 2 bridge adapters based on PL2303HX chip connected with rs232 together.

    adapter1  conn  adapter2
    TXD ---------------- RXD
    RXD --------------- TXD
    CTS --------------- RTS
    RTS --------------- CTS

    Without RTS/CTS connection it will not work with standard Win32 API WriteFile/ReadFile commands.

    Here are some PL2303HX benchmark results for big at-once transfer:
    64 KB @ 115200 bps Time 5766 ms Rate 11 KB/s 128 KB @ 460800 bps Time 2922 ms Rate 45 KB/s 256 KB @ 921600 bps Time 3015 ms Rate 87 KB/s  
    PL2303HX chips can work on much higher transfer speed, but one of adapters that I heave is limited with Sipex 323 chip and can not go higher than 1 Mbps. Anyway, reached results for higher rate: 1228800 bps 113 KB/s.
  15. Like
    RROMANO001 reacted to jazz in MSP430F550x based USB - UART bridge   
    I am working on SBW programmer, with 2 CDC ports. First port will be used for programmer itself, and second will be USB UART bridge without any relation to programmer. On this topic I will published also bridge as standalone solution without programmer.

    Target is to come close with performance to bridge chips (PL/FT/CP) at higher baud rate (921600 bps) with big at-once transfer. Of course, performance with few-bytes transfer will be pore, because MSP430F550x bridge will rely on standard CDC OS drivers that can not compete with dedicated driver solutions from bridge chips producers.

    MSP430F550x bridge will support:
    - any baud rate (probably till 1 Mbps), for example 123456 bps, 654321 bps...
    - 7/8 bit character length
    - no/odd/even parity
    - 1/2 stop bit

    Anyway, bridge chips are working better, and they are cheaper than MSP430F550x, but just want to show that MSP430F550x can also be used for this purpose without problems.

    Bridge example from original TI USB stack is not very useful, and form my point of view, it is showing the way how things not to be done.
  16. Like
    RROMANO001 reacted to spirilis in SocketCAN help needed   
    Either way you look at it, this looks like a fun hack project!
  17. Like
    RROMANO001 reacted to yyrkoon in SocketCAN help needed   
    No, not using Modbus. Yes using CANBus, but it is not free of timing constraints. In order to comunicate with the CANBus, from Linux using socketCAN, you have to set baud. When using the beaglebone black + Serial / CAN cape, communicating directly with the inverter. This baud rate is 250kbps. When using a virtual CANBus driver on the Linux development machine, playing back a long candump log file. I do not have to set baud rate. As timestamps are included in this log file.
     
    If I understand what you're asking. Yes, CANBus is the only physical layer.
     
    Only from( read ). As setting an arbitrary value when not knowing what you're setting can be dangerous in this situation.
     
     
    I will try. I am understanding more each day I get the chance to examine the output. Right now I am still working on code, and thinking how I can best show what the fields mean. For instance, each PGN has a set amount of 8 byte frames. In the case of AC Output status, there are 11 total frames. The first byte of each frame is what I now understand as a frame sequence number. Where only the least significant nibble matters for frame sequence tracking [0-A]. The second byte in the first frame is the byte count of the data sent in all 11 frames. Minus reserved / unused bytes marked with 0xFF. The next value is a 32 bit / 4 byte value that is unknown to me. Immediately after this, is what is known as a "line number". Line numbers we believe to represent grid power, generator, and DC power source. There are 3 line numbers 01, 02, 03. And 03 is where I am pulling my data from. 01, and 02 would have to represent grid power, and generator values, where we can not test for grid power. As we are completely off grid. Meaning we have no utility power. We can at some point test for generator power, but it will be some time.
     
    Anyway, I know English is not your first language, so I do not expect you to completely understand what I'm saying. This is ok, It will probably make more sense to you when I write up a complete document for AC Output Status. It may take some time however as I'm normally busy during the day doing things that are not as fun, but pay well enough . . .
     
    To help illustrate this some . . .
    typedef struct {     int voltage : 32;     int frmNum    :  8;     int current : 16;     int unknown   : 16; int unknown : 8;     int freq     : 16; }ac_output_line3; a - Values with underline are frame sequence numbers
    b - Bold values are "line numbers"
    c - red is RMS voltage
    d - green is current
    e - light blue is unknown field 16bit and unknown 8bit field.
    f - dark blue is frequency
     
     20 49 03 FC 33 01 01 00
     21 00 00 00 00 00 00 00
     22 00 00 00 FF FF 00 00
     23 00 00 00 00 00 00 00
     24 02 00 00 00 00 00 00
     25 00 00 00 00 00 FF FF
     26 00 00 00 00 00 00 00
     27 00 00 03 DA A4 03 00
     28 2C 06 00 00 09 6F 17
     29 FF FF 7A 01 00 00 57
     2A 01 00 00 08 FF FF FF
     
     
    The value for the whole 24bits seems to be 589824. When scaled by .01 this *could* one of the power related fields. I am not sure, I have not done the math, but it is close. However when aligning this 24bit field into an int : 24; struct field. The values after ( left to right, and top to bottom ) go out of alignment. I'm sure there is a good reason for this, but I have not figured it out yet . . .
     
    Never mind based on voltage * current we'd get 3773.198 watts, so probably not a single field but two separate fields.
     
    More guessing . . .
     
    29 FF FF 7A 01 00 00 57
    2A 01 00 00 08 FF FF FF
     
    First bolded 16bit field seems to be apparent power and second bolded 16bits seems to be real power. Again working left to right, top to bottom. For the record the data seems to be little endian . . . *I think* Oh, and right, these values would be multiplied by 10. So -> power = ( value * 10 ), and rounded to the nearest ten;
  18. Like
    RROMANO001 reacted to username in Who is using MSP430G2553?   
    For hobby use with low pin counts, yes, always G2553. For commercial use or if more pins are needed, I go with freescale MCUs or whatever i'm forced to use. Yes, I likewise hate the arduino 5V... 3.3V is fine for me in every application even in low power.
  19. Like
    RROMANO001 reacted to enl in Who is using MSP430G2553?   
    I will freely admit that I am still a DIP guy. Several reasons: I'v been around a long time so familiarity is a piece; I can see a DIP without the microscope; Most of what I do anymore is personal or for teaching, and being able to pop a 2553 or 2452 or.. into  breadboard with a small cap an a resistor and nothing else, rather than make up a PC board, is a big benefit.
  20. Like
    RROMANO001 got a reaction from Servtes1426459984 in Two SPI 2 for nrf24l01 and 3 for enc28j60 bad function   
    and from SPI NRF library released by Spirillis, if this is the one are you using:
    Enrf24 radio(P2_0, P2_1, P2_2);  // CE, CSN, IRQ pins
     
     this case both devices use the same pins for CS and CSN, this is a conflict, please can you post as I requested:
     - which pin are connected to NRF
     - which pin are connected to ENC
     -*** SETUP of SPI and pin assignment for NRF
     -*** SETUP of SPI and pin assignment for ENC
     
     - Which library are you using, please point where you got them to have reference at hand.
     
     If both library use same additional pin conflict can garbage communication on devices, so also ENC seems working but can be it behave bad too.
  21. Like
    RROMANO001 got a reaction from Servtes1426459984 in Two SPI 2 for nrf24l01 and 3 for enc28j60 bad function   
    Documentation say where SPI channel are mapped but nothing about additional pin, so for NRF module I see this:
    /*Mapeo de pines SPI del Stellaris LMF120H5QR*/
    #define P2_0 PA_5 // CE
    #define P2_1 PA_6 // CSN
    #define P2_2 PA_7 // IRQ
     
     these pin refer to SPI1
     What about SPI of enc module? is as original wired to SPI3? this case all is ok
     
     Are all NRF pin connected the right way?
     Just do an inspection to NRF library too.
  22. Like
    RROMANO001 reacted to rockets4kids in TI Hercules. Suitable for casual and hobby use?   
    I have seen plenty of people using Arduinos and Raspberry Pis as flight computers for these applications, so clearly power consumption isn't *that* great of a concern.  ;-)
     
    I agree that an MSP430 part would likely have lower power consumption than a Hercules part, but I would be willing to bet that a Hercules part -- when used/coded properly -- would consume *considerably* less power than what most people are actually using.
     
    I mention this application because I have seen a fair number of discussions on flight computer failures.  Now personally, I suspect the primary cause to be related to vibration on spring-loaded connectors.  I've seen some pretty janky wiring jobs.  But cosmic radiation levels are much greater at high altitudes so this is a real possibility.  (BTW, janky *is* a real word now.  http://time.com/3724601/oxford-dictionary-janky-egot-ridesharing/)
     
    I am aware that FRAM has some level of immunity to the effects of cosmic rays, but as I understand it the SRAM and the core logic could certainly be effected.  As such, the effects of a cosmic-ray induced bit flip could easily go unnoticed causing a series of cascading failures before the watchdog is triggered.  But then you still are left with all the mess between the cosmic ray event and the watchdog trigger.  (There is also no guarantee that a failure will result in triggering of the watchdog.)
     
    As best as I can tell, the lock-step operation of the Hercules parts would provide much quicker notification of an event, and thus much quicker restart with less chance of data loss or corruption.  This is certainly no substitute for a fully rad-hard system, but it seems as if it gets you a long way in that direction for a fraction of the price.
     
    In any case, it seems as if this could be a prime hobbyist application for the part.  I am *very* curious to know if anyone who knows more about the architecture of the Hercules can actually provide some more detail here.
  23. Like
    RROMANO001 reacted to L.R.A in [Energia Library] Time_Capture   
    So I made a API to help use the Tiva time capture mode with the timers. So I decided to port it to Energia.

    For now it only works with the wide timers.
    I will try in the future when I have more time to get more info on it.
    But for now I will leave this notes:
    The possible pins to use are PC4, PC5, PC6, PC7 and from PD0 to PD7, including making a total of 12 inputs. Unlike pulseIn() you can't simply use any pin. 
    The functions need to know the pin as parameter. The parameter should be for example "PC4" and not "PC_4".
    There are functions to get the direct reading, the reading in nanoseconds (precision of 12.5ns) and reading in microseconds (precision 1us). 
    There are functions with timeouts also.
    There are also non-blocking functions. An examples shows how to use them.
    The time from when the functions are called to the time the end of the pulse should be less than 53 seconds. Like pulseIn() it waits for the pulse to rise (in positive pulse readings) or fall (in negative pulse readings) and then measures the time it takes to change back.

    I hope it helps some peeps
    Time_Capture.rar <- V1.0
    Time_Capture_V2.0.rar <- V2.0 fixed problem described here
     
  24. Like
    RROMANO001 reacted to Fred in Some target board deals   
    A few of us now have the MSP-FET - mainly thanks to TI's ESI project. The target boards are great if you want to prototype something quickly and need to use a device that's only in a SMT package. However they're quite enpensive for hobbyist use. I thought it worth mentioning that I found a US eBay seller hrojas with some target boards for $20 each. He even did me a deal on international shipping as I bought a few. He's got the following: TS430PW28A, TS430RGC64USB, TS430PZ100B, TS430PS24, TS430L092, TS430RGC64C
     
    I also noticed that the target boards listed a while ago with TI deals on them are still at that low price - or in some cases even lower. They're shown as full price on the TI site but if you click "buy from TI" the price in your shopping cart is lower. I think I checked them all and these are the ones that come up cheaper than listed. (Some by a lot, some not so much.) These are perhaps the ones that are a little less in demand and aren't selling so well, but they might be useful.
     
    TS430L092 - $20
    TS430PEU128 - $20
    TS430PW24 - $30
    TS430DL48 - $40
    TS430PN80A - $55
    TS430PW28A - $55
    TS430PZ100 - $55
    TS430RGZ48B - $75
    TS430RSB40 - $75
  25. Like
    RROMANO001 reacted to yosh in Mailbag   
    You could go to a veterinarian who makes microchip implants for dogs or to a studio which makes transdermal implants/piercings.
×
×
  • Create New...