Jump to content

jkroby

Members
  • Content Count

    15
  • Joined

  • Last visited

About jkroby

  • Rank
    Member

Contact Methods

  • Website URL
    http://www.p3r.info

Profile Information

  • Location
    Italy
  1. jkroby

    rs232 to i2c

    Hi, from much time i need that, connoect a msp430g2553 to a serial converter or in my case to a friendly arm serial port, ttl level and simply comunicate with a i2c bus. I have also perl library and examples. Specific driver for io expander and 18 bit ad converter on i2c bus. Very easy to add functions. Developed under GPL jkroby@p3r.info I use maximum speed of 115200 baud but i think it can go faster. at 115200 baud 8Mhz 3V is tested and full running every days. It is a part of a heating system. web_rs232.zip
  2. A simple port of Energia SoftSerial to timer1 On pin 8 and 9 so there is a new serial independent from Serial, for use call Serial1 as you use Serial. http://www.p3r.info/gpl/energia/Serial1.tar.bz Roberto Pomo
  3. This is an optimized library based on Energia IR library. This library uses a Capture Register for run in interrupt without memory store. The timer is configurable as the pin (only with hardware connection at timer). The example included is configured for msp430G2553. The example reads the number from ir transmitter one or more key and when you press EQ key it make led blinking. Tested on LaunchPad using pin 11 for input and LED1 for led. It transmit on serial key values and read number. in the soon feature test on msp430f2013. The library uses 18 Bytes of ram. The interface is in object mode, there are c and h files for low level usage. The code is less than 650-800 Bytes. This library is intended for use in low memory and low power situations. You can turn off cpu and it consume nothing. It need only the clock at the Timer. In the h*. files you can config timer channel divider because all configuration are made by preprocs. File: http://www.p3r.info/gpl/energia/nec_ir_0_0_1.tar.bz Roberto
  4. jkroby

    preprocs math optimization

    Hi, found solution, if someone is interested. 4.0 need for float calculation no (4) #define USECPERTICK (4.0/16) //freq. 16Mhz divisor 4 #define TOLERANCE 25 // percent tolerance in measurements #define LTOL (1.0 - TOLERANCE/100.) #define UTOL (1.0 + TOLERANCE/100.) (unsigned int) need for no runtime conversion #define TICKS_LOW(us) (unsigned int) (((us)*LTOL/USECPERTICK)) #define TICKS_HIGH(us) (unsigned int) (((us)*UTOL/USECPERTICK + 1))
  5. jkroby

    preprocs math optimization

    the usage is: MATCH(TIME,NEC_BIT_MARK) for instance, where time is the variable and NEC_BIT_MARK is a constant #define NEC_BIT_MARK 560 i know, floating point is big, but it should be a way for calculating a constant not by hand, not wrote by me, i found the code and i use it. My idea is only optimize the code for integrate in a non development program. i use another way with all constant by hand. Roberto.
  6. jkroby

    preprocs math optimization

    Better, but not enought, the size is reduced to 3273 bytes (3723 before), with constants 741 bytes. In theory the preprocessor had to convert all he can in constants, because all values are constants, but it does'n do it. Robero.
  7. Hi, i startin try to optimize library IRremote from energia section NEC. I removed memory usage and change timer_a function, all ok, there is a macro: #define USECPERTICK (4/16) //freq. 16Mhz divisor 4 #define TOLERANCE 25 // percent tolerance in measurements #define LTOL (1.0 - TOLERANCE/100.) #define UTOL (1.0 + TOLERANCE/100.) #define TICKS_LOW(us) (int) (((us)*LTOL/USECPERTICK)) #define TICKS_HIGH(us) (int) (((us)*UTOL/USECPERTICK + 1)) define MATCH(measured,desired) (measured >= TICKS_LOW(desired) && measured <= TICKS_HIGH(desired)) where desired is an integer constant, i have found this code. i have changed USECPERTICK because i use timer as capture with clock divisor of 4. The code size is about 4000 bytes. about 600 bytes other part of previous program. i think it is not possible, the program is very simply, so i use this macro: #define MATCH(measured,desired) (measured >= desired##_A && measured <= desired##_ where i create 2 new constant by hand #define NEC_HDR_MARK 9000 #define NEC_HDR_MARK_A 27000 #define NEC_HDR_MARK_B 180000 so the preprocs use the _A and _B variant. size reduced to ~ 750 bytes. in the last years i use Perl, java, javascript for the 98% of my programs but i remember: The preprocs exec math operation, when it can, and put a numeric constant. There is some flag to use? What needs for? in Perl there isn't preprocs ok, but in C there is so what it needs if it is converted in code?! i can wrote all in c code and then manually optimized. Roberto.
  8. for SATYA my compression tecnique is possible for more channels not only 2 bytes, 3 or 4 for increase number of data and time slot. Keep in mind that rap-rap controller do it, low power stepper but with long_motors controller you can use very strong engine! Roberto.
  9. Hi, for information have a look at rap-rap controller, G-code interpreter based on Arduino-mega. A complete hardware project. What kind of Stepper do you use? Vcc? If the stepper is a 6V and you use 6 or 8V Vcc you can do a tourn/Second at maximum. You need a high Vcc for fast movement, if you wont only small movement, ok. Exist on ebay a seller: longs_motor who sell stepper and controller, low cost. In some situations the Vcc is 240V fo support full speed. I'm generally agree with the idea of an engaged controller with many pwm. For the problem of SMD i have wrote a post universal PCB, between some days i'll post preliminary PCB with MSP 100pin 6pwm 3 AD 16bit. The best solution i think, with the PC compile the movement instructions in a easier system: in the trouth you consider the space as a bitmap, if you dray a line, with no microstep, you need to do one step in a direction and 2 or 3 or 10 it depend in another direction, the same for other direction. You post via RS232 well if you use http://www.ebay.it/itm/1pcs-USB-2-0-to-TTL-UART-6PIN-Module-Serial-Converter-CP2102-STC-PRGMR-/251039347548?pt=LH_DefaultDomain_0&hash=item3a731c735c very fast and it give +3.3V for controller. So 2 bytes 1 time delay 2 data: the data is 8 bit step(4 pin max) and dir(4 pin max) it wait given time from previous command and then write it on port, so no jitter, simply to do. few data. There are programs for routing, necessary if you wont to use it for 3D, very complicated, you can do it but is a big works; in the rap-rap site you find information about. If you wont to use POV-RAY for the 3D model there is a not too difficoult tecnique to transform it in a multi plane 2D image for control the machine. Roberto.
  10. jkroby

    Universal PCB

    Another think, Have you seen MSP430AFE series? (AFE253 ) If you comprendunderstan my idea. Roberto.
  11. jkroby

    Universal PCB

    I don't wont everybody use this schema, i wont to use big chip 100pin or 64pin, whith 2 channel serial and 2 spi/i2c i don't use arduino because it is not enought powerfoull! Simply. I choose Energia because it has library, a starting place, a test device(lounchpad where i have tested ad 16 bit and wrote a little library SD16) and because it has many devices included, AD, PWM, DAC, SERIAL and many many pin. Not in second place, it can run without components, i have buy USB2rs232ttl (cp2102) i connect it to a chip an it un, no external components, the cp2102 has a power souce, power... 0W if stopped. I i connect a LCD 0.6W with backlight. But in every situation few components. Fast to prototipize, i play but i work too... :-) If i can use less power... Good. I need to keep the chip coold for many reasons. I think you speak about power but i'm not sure you use the calculator. I prefere Energia because is better use existent library, i compile in my project but it is tested. If you think that it is not a good idea, OK, i have wrote for find people interested in this idea, i have not asked who is not agree pleas say me! There are thinks that we can do in various way, but if i need to monitorize 3 line in AC i can't use less than 2mA you can understand? MSP430 can do, which is your problem? You wont it use 0.2mA when i find a way, great! Today i have much problem with cheaper switching that can worh more than 2 month. I think that my explanation is very compleate, if you think my idea is not goot, ok, i know, i can,' always swim in a glass, my idea is, if i can make that is better if other peole can use my works, as Arduino give possibility to people that aren't able to calculare a resistor to wrote programs, very basically but some people a day can wrote some of good. This is my only idea, if i can do 2 with some other people we do 4. Better i think. My first program on controller i wrote 19 year ago with my first circuit with controller and the project way mine, 2 years later i build a clock miniaturised, for that time with no SMD. I think you use only for lost time... Roberto.
  12. jkroby

    Universal PCB

    Low power, yes, relatively to the works, do wour realy thinks that 200mA in controlling a machine that consumpt 10Kw is important? 66 parts for million of energy dispersed?! Have you ever seen the power loss in a standard battery charger? 2.5W of energy from 45W of primary energi?! it is wrote on the bottom... The big ability of MSP430 is low consumption, yes, read data in hardware and cpu off, then on and computate, turn off and wait. If i do an universal PCB for not make many PCB what can change with consumption? Are you secure of what you intend to tell? So you tell that MSP430F2001 is more efficent that 5510? 5510 has many hardware component and so it consume much... But lounchpad use energy from USB so you has to keep PC on, energetics... Very efficent?! If you are interes only in playng, nothings to say, i have made a question: Some one, interested to develope Energia and MSP430, thinks this is an interesting idea? Other component needed? If you wont to see a led blinking... you are not interested... But if you wont to came out from little experiment and develope a library it is another thinks. Only in a work bench multi PCB is usefoull, if you wont Energia on a Plane (low power, very low!) on a robot or attached at a big machine or in the house as a part of it you need a dedicated PCB, not today, not next week but you well need. I have bou various component hardware to test, but at a certain point i'll need to put my component in a place, not on work bench and use it remotely from PC, when i can i put an Arm but in ceranly case it is too big, it consume too much and it is not easy to connect. Roberto.
  13. jkroby

    Universal PCB

    I know it is difficoult, how i have wrote in the attached file, the ideas is to be able to use in one pcb all kind of devices, not neccessary every at a time! And the power consumption is one of the problems, if i measure 400V power, it is not a problem! take power from external source not from battery! I thinks wrote drivers for Linux is more complicated... But i do it, i prefere wrote a new library for Energia than wrote all from zero, so i can use a library and wrote only only a piece and some one wote new piece... Or not?
  14. jkroby

    Universal PCB

    I know, that Lounchpad is not intended for high power computation or industrial use, but exist olimexino-5510 that is high computation... In the trouth MSP430 is very stronger than Arduino UNO, much more devices and ability. Ok if your own interest is only to play it is ok... I know peoples than uses Arduino for industrial thinks, i have used FriendlyArm for that. I ask only if: why, if we chose of works with MSP430, we can't use all it's power? For hobby, measure battery (in car or trucks) Amperes using existing cables (ADC SD16) temperature very precise with SD16 or more complicated thinks? Nordic RF24 and remote measure or control? Now i use Ethernet for remote control or automatization but in other situation it is not a well thinks, better RF at low price... It isn't? I have not problem to build it for me but i thinks it is better make some thinks usefoull for many people. Roberto.
  15. jkroby

    Universal PCB

    Hi, my greatest problem with controllers is: SMD so i think i buy a board, great: there isn't for what i wont! i need AD 16 or 24 bit and much more... i need to weld other components, if i use many little board the projects is instable and too big. so i think: if i make a PCB for sold controller? Good But it isn't better if i can put more than one controller type? YES So i have wrote an explanation of intent, a PCB for sold many components types for using in every situations, many kinds of devices place and differents version of MSP430 plus or less expansive. The arduino board is less expansive because many peoples use it and much produce it. Lounchpad is great but not enaught for every thinks as other starter kit. I think Enegia needs an hardware standard, ok for little projects is enought an universal PCB, in the future introduce an lcd directly driven or... The MSP430 is able by itself to do a multimeter or much... I buy lounchpad not only for funn, i think MSP430+Energia is more efficient and powerfoull than Arduino they needs only to become adults with a real Hardware. All other thinks are in the attached file. How do you think about? I have make errors? Other components to consider? Roberto Pomo test1.ps
×