• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by phenyl

  1. Hi All First, I would like to thank @Rei Vilo for providing the Library for the Kentec (BOOSTXL-k350qvg) library with Energia. I copied the code out of (as I didn't find the powerpoint or pdf) and got it to work with an MSP430F5529 launchpad. (Energia 18, Windows as the Mac version doesn't work atm). Then I compiled the same code on a MSP432P401R launchpad and it runs a lot slower than on the F5529 (I assume this is a known issue, due to slow SPI speed ( ) but also doesn't look the same, the fonts are "skinnier on the MSP432. This discrepancy, I cannot explain. Another question: If I want to write a changing variable, in this case simply the x-coordinate of the touch to the screen, how do I locally clear the screen without redrawing everything (or if I want to make a bar graph that represents eg a changing value of a sensor? Do I always draw a black rectangle, then the bar/text etc? or is there a simpler way that is not immediately obvious to me now? Next step: I have to learn more about state machines to switch screens (settings), do stuff there, come back to main without the program getting into badly readable territory. Thank you very much for your help. //First steps with the Kentec Display #include "SPI.h" #include "Screen_K35_SPI.h" Screen_K35_SPI myScreen; uint16_t colours[6]; uint16_t x; uint16_t y; uint16_t z; uint8_t initFlag; void setup() { Serial.begin(9600); Serial.println(); Serial.println("hello"); Serial.println(); pinMode(RED_LED, OUTPUT); myScreen.begin(); myScreen.clear(); colours[0] = myScreen.calculateColour(255, 0, 0); colours[1] = myScreen.calculateColour(0, 255, 0); colours[2] = myScreen.calculateColour(0, 0, 255); colours[3] = myScreen.calculateColour(255, 255, 255); colours[4] = myScreen.calculateColour(255, 255, 0); colours[5] = myScreen.calculateColour(0, 0, 0); x = 0; y = 0; z = 0; myScreen.setPenSolid(true); myScreen.setFontSolid(false); myScreen.setFontSize(2); initFlag = 1; } void loop() { if (initFlag) { drawHomeScreen(); initFlag = 0; } if (myScreen.isTouch() > 0) { myScreen.getTouch(x, y, z); myScreen.gText(10, 10, btoa(x, 8), colours[3]); Serial.print(x); Serial.print(" "); Serial.print(y); Serial.print(" "); Serial.println(z); } if (z > 100) { if ((x < 160 && x > 0) && (y < 240 && y > 100)) { digitalWrite(RED_LED, HIGH); } else if ((x < 320 && x > 160) && (y > 100 && y < 240)) { digitalWrite(RED_LED, LOW); } else if ((x < 320 && x > 160) && (y > 0 && y < 100)) { drawSettingsScreen(); } } } void drawHomeScreen() { myScreen.clear(); myScreen.gText(30, 50, "TOUCH LCD DEMO", colours[4]); myScreen.rectangle(0, 100, 160, 239, colours[1]); myScreen.gText(50, 180, "ON", colours[0]); myScreen.rectangle(160, 100, 319, 239, colours[0]); myScreen.gText(235, 180, "OFF", colours[1]); myScreen.rectangle(160, 0, 319, 100, colours[2]); myScreen.gText(180, 50, "SETTINGS", colours[3]); } void drawSettingsScreen() { myScreen.clear(); myScreen.gText(10, 10, "TOUCH LCD DEMO", colours[0]); myScreen.gText(10, 30, "TOUCH LCD DEMO", colours[1]); myScreen.gText(10, 50, "TOUCH LCD DEMO", colours[2]); myScreen.gText(10, 70, "TOUCH LCD DEMO", colours[3]); myScreen.gText(10, 90, "TOUCH LCD DEMO", colours[4]); }
  2. Hi @dubnet Thank you very much for your answer, I think this issue was for ccs. With ccs6 there was a slow TI GraphicsLib and they sped it up significantly for ccs v7 but I am not sure that one can just drop that into energia and be done with it. I did run the CCSv7 Demo on the MSP432 and it was FAST. (I am not ready for jumping over to the world of direct register manipulation tho... Energia is a good compromise for me in order to get ahead with my hobby projects...)
  3. Here's a gui composer demo: which links to ( Sorry! We couldn't find your page) atm
  4. Thank you very much, I opened an issue and will follow it and provide any info needed.
  5. Hi, I updated to OS X High sierra, and installed a fresh copy of energia 18 from and replaced the arduino-builder with the one from above post, but unfortunately, blink fails to compile (board chosen F5529) /Applications/ -dump-prefs -logger=machine -hardware "/Applications/" -hardware "/Users/baettig/Library/Energia15/packages" -tools "/Applications/" -tools "/Applications/" -tools "/Users/baettig/Library/Energia15/packages" -built-in-libraries "/Applications/" -libraries "/Users/baettig/Documents/Energia/libraries" -fqbn=energia:msp430:MSP-EXP430F5529LP -ide-version=10610 -build-path "/var/folders/67/4hcf1n2n6k19d5kvvbztt9qh0000gn/T/builded0b72ce2b4f77512eec99a6713fe17d.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "/Applications/" arduino-builder returned 139 Error compiling for board MSP-EXP430F5529LP. I would be happy to provide more details in order to get energia running again. BTW is there an ETA for a new release (19)? Thank you very much for your help Edit: sorry for posting under tiva, but this was the most pertinent thread I found and I didn't think it important enough to open a new one with the same content under msp430...
  6. Hi, is that also possible with SPI in case there are several SPI interfaces? (One interface at a time means one per sketch or the first interface, then the second, then the first again in the same sketch?) Thank you very much
  7. Well, I tried ordering two of the boards and a couple small tx modules. Luckily they sent me a mail asking if I accepted their shipping charge of 76.81 USD. (for a total of 31 USD of components) Which feels outrageous and so I politely declined... I chose "cheapest international shipping method", so for living out of the US it's simply out of any range of justification for a hobby purchase.
  8. @@greeeg , iirc they do stencils, too. But as you say, depending on use case and shipping specifics the one or the other may be cheaper. @@zeke, not sure if you got my PM? Tapatalk was hiccupping yesterday night. Edit: I should read all posts in a thread... Sent from my Nexus 6P using Tapatalk
  9. Yeah it is Sent from my Nexus 6P using Tapatalk
  10. Hi @@zeke in my (limited) opinion, their work is good. Here's a board (the gerbers came from an eevblog member,[1] not mine) I had made privately: I had some made, the one I soldered the components on works perfectly. Of the ones from work I don't have any pictures obviously, they were only for a small project with a few components. The finish there was ENIG, which also turned out really well. [1]
  11. Hi @@artium, thank you very much (and also adafruit ) I ran the benchmarks on my msp432 launchpad and also on my msp430f5529 launchpad (25 MHz), here with #define USE_FAST_PINIO commented for both. msp432 Display Power Mode: 0x9C MADCTL Mode: 0x48 Pixel Format: 0x5 Image Format: 0x0 Self Diagnostic: 0x0 Benchmark Time (microseconds) Screen fill 31922493 Text 1787874 Lines 17494289 Horiz/Vert Lines 2618766 Rectangles (outline) 1675845 Rectangles (filled) 66276560 Circles (filled) 9775988 Circles (outline) 7653239 Triangles (outline) 5548662 Triangles (filled) 21812339 Rounded rects (outline) 3461099 Rounded rects (filled) 72269681 Done! msp430f5529 ILI9341 Test! Display Power Mode: 0x60 MADCTL Mode: 0x0 Pixel Format: 0xFF Image Format: 0x0 Self Diagnostic: 0x0 Benchmark Time (microseconds) Screen fill 2263167 Text 340734 Lines 3615312 Horiz/Vert Lines 195546 Rectangles (outline) 133089 Rectangles (filled) 4699971 Circles (filled) 1194204 Circles (outline) 1580064 Triangles (outline) 1146462 Triangles (filled) 1952517 Rounded rects (outline) 558189 Rounded rects (filled) 5281704 Done! The 432 seems to be significantly slower in everything than the 5529, which I don't understand yet. (I did use uint32_t, I forgot which one I used when writing the forum post away from my home computer)...
  12. Hi Zeke, I was using at work and for a private project or two. At work we paid for fast shipping on some small simple boards that we needed quickly, the boards got here in less than a work week and looked good (and performed well). Otherwise you can check on, they run comparisons on your size and time-requirements to help you find the optimal boardhouse. (I am unaffiliated with either company, only a customer and I used pcbshoppers website).
  13. Thank you very much for the info. I am in Switzerland, so I probably better forget about it... Unfortunately this board is not available with mouser, farnell, which ship to Switzerland for free if the order is for more than a certain amount.
  14. Hi @@artium Thank you very much for making this library available. I compiled it on a F5529 launchpad without issue (needed to adapt the pins slightly) I am trying to get it working on the msp432 now, however I am running into problems. First it mentions that min(,) is not defined, this is easily circumvented with two definesat the top of the sketch: Then I changed volatile RwReg with volatile int32_t in the h file where the SPI pin pointers are defined. Unfortunately, now the compiler tells me that digitalpintoport and associated functions are not defined. Do you or anyone have any hints? I'll upload the exact error message tonight, this is from memory...
  15. Did anyone order these boards by chance and could report on international shipping costs? I went through the whole order process and would have had to click confirm order without knowing the shipping costs... There are not estimates anywhere to be found unfortunately. (The boards are now up to 10 USD a piece...) Thank you very much
  16. Testing tapatalk. Sent from my SM-N9005 using Tapatalk
  17. Hi @Kelton Two quick questions: Did you restart energies after adding the libraries? It needs to read in the directories. Did you format your drive with the case sensitive hfs+ ? Then you'd need to match the spellings.
  18. Thank you very much. I am not yet sure if I really want to invest in a cnc mill or if a reflow oven (T962 or T-962A, where I am not sure what the differences are other than the price...) But it is interesting to see what is out there. Your project is really great, btw, kudos also from me!
  19. @@greeeg thank you for posting the guide! What kind of mill are you using? Sent from my SM-N9005 using Tapatalk
  20. Hi @@greeeg I downloaded cadstar and it installed design editor, library editor and migrate tool. If I transfer an example schematic to pcb I get a message that "the pcb design editor will work in unlicensed mode" and ... saving might not need possible. If I understand correctly, that would be included in cadstar express (or bigger) "The latest version of the CADSTAR Express free evaluation software for simple designs (limited to 50 components and 300 pins, is available to download at" The orcad offer also seems to be only for the schematic capture part (as well as only for our friends in the US ) Thank you very much for your answer!
  21. Hi Zeke, thank you very much for posting these offers. As I am only acquainted with Eagle I wanted to ask whether the featured Cadstar (or Orcad) packages are "just" schematic capture packages or whether one can prepare, route PCBs and export the Gerbers for production? Thank you very much!
  22. Hi, I am working on porting to energia and extending (by the ADS1258) an ADC-library (for the ADS1248 and ADS1256) that flydroid originally wrote for the teensy/arduino to energia on My effort so far is under I got it running so far under an arduino uno, but have started running into limitations. The project will need more pins and serial speed (explaining my earlier question concerning the CDC mode to which I'll surely come back) and probably also RAM. I added in the #if !defined(ENERGIA) for the SPI begin and end transactions which are missing in energia. Then I tried compiling, but didn't get any reading on the serial port, so (still using the library) I wrote this minimal sketch: #include <SPI.h> #include "ads12xx.h" #define LED RED_LED const int START = 4;//8; const int CS = 8;//10; const int DRDY = 5;//2; const int RESET_PIN =3;// 9; ads12xx ADS(CS, START, DRDY); //initialize ADS as object of the ads12xx class void setup() { pinMode(LED, OUTPUT); digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second Serial.begin(115200); while (!Serial) { } Serial.println("Serial online"); Serial.println("testing"); delay(1000); } void loop() { Serial.println("looping"); // put your main code here, to run repeatedly: } But it doesn't even blink the LED unless I comment out ads12xx ADS(CS, START, DRDY); I am not sure what goes wrong in the ADC initialization code for MSP that works with arduino: // ads12xx setup ads12xx::ads12xx(const int CS, const int START, const int DRDY) { pinMode(CS, OUTPUT); // set the slaveSelectPin as an output: digitalWrite(CS, HIGH); // CS HIGH = no select #ifdef ADS1248 pinMode(START, OUTPUT); // set START pin as Output digitalWrite(START, HIGH); // HIGH = Start Convert Continuously _START = START; #define spimodeX SPI_MODE1 #endif #ifdef ADS1256 #define spimodeX SPI_MODE1 #endif #ifdef ADS1258 pinMode(START, OUTPUT); // set START pin as Output digitalWrite(START, LOW); // HIGH = Start Convert Continuously // delayMicroseconds(1000000); delay(1000); digitalWrite(START, HIGH); // HIGH = Start Convert Continuously // delayMicroseconds(1000000); delay(1000); _START = START; #define spimodeX SPI_MODE3 #endif pinMode(DRDY, INPUT); // DRDY read _CS = CS; _DRDY = DRDY; // delayMicroseconds(500000); delay(1000); #if defined(ENERGIA) SPI.setBitOrder(MSBFIRST); SPI.setDataMode(spimodeX); SPI.setClockDivider(SPI_CLOCK_DIV8); #endif SPI.begin(); #if !defined(ENERGIA) attachInterrupt(0, _DRDY_Interuppt, FALLING); //Interrupt setup for DRDY detection #endif #if defined(ENERGIA) attachInterrupt(5, _DRDY_Interuppt, FALLING); //Interrupt setup for DRDY detection #endif // delayMicroseconds(500000); delay(1000); // interal VREF einschalten } If anyone has any idea on how to get it running, I'd be grateful. Once everything is working, I'll design a pcb and I'd rather stay with a TI microcontroller. (Not in the least as I'm trying to get up to speed with programming them more directly in CCS, but I have a four year old, so my progress on that front is only sporadic )
  23. Hi @@spirilis thank you very much for your help. Today when I restarted looking at the problem after work, strangely everything worked with the F5529, I didn't change any code or upload the program, so it's a bit of a mystery as to why it wasn't working yesterday, maybe the adc was stuck in reset for some strange reason? I connected 2 V to the first differential pair of inputs and went into continuous acquisition mode (-> t -> 8) and got the expected result: 528090 -1.970356 0.004046 -0.001466 0.000032 0.000062 -0.000001 0.007246 -0.005542 528113 -1.968118 0.000920 -0.000300 -0.000445 0.000017 -0.000172 -0.000202 0.000260 528135 -1.909522 -0.000111 0.000010 0.007555 -0.008118 -0.000058 -0.000406 0.000018 528157 -1.964004 -0.000027 -0.000020 0.001926 -0.004517 0.000055 0.003017 -0.000562 528180 -1.962540 0.004390 -0.000310 -0.000463 0.000017 0.000001 0.006405 -0.000039 528202 -1.944292 0.000204 -0.000108 0.000015 0.000408 -0.000148 -0.000106 0.000029 528224 -1.985303 -0.000022 -0.000022 0.002268 -0.001038 -0.000189 -0.000210 0.000058 528246 -1.959754 0.000209 0.000307 -0.002600 -0.000274 0.000928 0.000506 -0.000055 528269 -1.909710 0.007601 -0.000086 0.000000 0.000322 0.007256 -0.007181 0.000065 528291 -1.991854 0.015968 -0.000342 0.000013 0.000016 -0.000230 0.000001 0.000121 528313 -1.991457 0.000289 0.001266 -0.005775 -0.000045 -0.000485 -0.000028 0.000108 528336 -1.884752 -0.000025 0.005335 -0.009485 0.000186 0.006303 -0.002317 0.000064 528358 -1.942423 -0.000205 -0.000521 0.000004 0.000016 0.009694 -0.001051 -0.000129 528380 -1.991979 -0.000029 -0.000215 0.000301 0.000619 -0.000118 -0.000002 0.000814 not too bad for the flying lead connections and Vref set to AVCC (which is 5.000 V from a rigol dp832 via long leads). So the next steps are now to look into the fast USB mode and then to design a pcb with the adc and some amplification between the MUXOUT and the ADCIN. Thank you very much for your help! I'll tidy the code up some, and will put the newest version back up on github in the next few days.
  24. Thank you very much for your help. @@spirilis That took care of the initialization, I can see the reset command sent and the SDATAC command sent. Unfortunately, thereafter the spi bus stays silent. Strangely I am also not seeing the drdy signal pulse which happened on the arduino; I am sure that I connected it to 1_6 and have the corresponding LA cable on the back of the header.
  25. Ok, thank you very much. I changed that to pin 5 (P1_6), but still nothing on the SPI bus...