Jump to content

L.R.A

Members
  • Content Count

    598
  • Joined

  • Last visited

  • Days Won

    12

Reputation Activity

  1. Like
    L.R.A reacted to vladn in PWM changes depending on the code it's running   
    To illustrate the benefits of the glitch free PWM here is a super trivial (essentially a one liner) servo library. No interrupts required - very efficient. Supports digital servos at higher PWM freqs too ! Two examples are included - a  minimalistic one for a single servo, and a bit more involved one running 3 servos asynchronously with different control PWM frequencies and sweep periods. This library *requires* the wiring_analog.c file from the post above (it replaces the original one in the hardware/lm4f/cores/lm4f/).
     
    TServo.zip
  2. Like
    L.R.A reacted to vladn in PWM changes depending on the code it's running   
    The linker seems to have a sporadic problem (huge .bin files) with uint64_t that I used in the updated PWMWrite(). Changed the type to float and things seem to work OK now. Please use the updated version:
    wiring_analog.c
    Also added support for the floating point angle to the TServo
    TServo.zip
    Updated code also posted to github:
    https://github.com/vladn2/Energia/
     
  3. Like
    L.R.A got a reaction from cam in Energia 0101E0011 will not compile code   
    I had similar problems here: http://forum.43oh.com/topic/4842-did-any-driverlib-in-stellaris-change/
     
    check out this:http://www.ti.com/lit/an/spma050a/spma050a.pdf
    Now energia uses TivaWare istead of StellarisWare and some changes were made
  4. Like
    L.R.A got a reaction from energia in Energia 0101E0011 will not compile code   
    I had similar problems here: http://forum.43oh.com/topic/4842-did-any-driverlib-in-stellaris-change/
     
    check out this:http://www.ti.com/lit/an/spma050a/spma050a.pdf
    Now energia uses TivaWare istead of StellarisWare and some changes were made
  5. Like
    L.R.A got a reaction from lotus77 in Energia serial.print will not talk to Windows 7 pro sp1.   
    I have that problem ever since i got this computer...i have to like disconect and reconect the USB cable alot. Like 1/20 it works.
     
    Since it doesn't seem anyone got that issue i just gave up and got a nokia5110 for debugging 
  6. Like
    L.R.A got a reaction from KJH in [SOLVED] PWM Frequency in Energia   
    I had the same problem. Just call the PWM fuction when you change duty.
    Look here, it's for a stellaris but the principle is the same:
    http://forum.stellarisiti.com/topic/1798-pwm-changes-depending-on-the-code-its-running/
  7. Like
    L.R.A reacted to energia in Did any driverlib in stellaris change?   
    Exactly! I will bring this up with the Tiva team and ask them what the reason is for implementing it this way. As I said, I should be able to compile any of the c files without issues which is not the case in the current driverlib.
  8. Like
    L.R.A got a reaction from energia in Did any driverlib in stellaris change?   
    So here is the "aftermat":
     
    Driverlib files that needed adding #include <inttypes.h> #include <stdbool.h>:
    debug.h
    uart.h
    sysctl.h
    interrupt.h
    i2c.h
     
    Also updated names of I2Cn_MASTER_BASE to I2Cn_BASE in library.
    Gona post the library updated now with these notes
  9. Like
    L.R.A got a reaction from bluehash in Did any driverlib in stellaris change?   
    So here is the "aftermat":
     
    Driverlib files that needed adding #include <inttypes.h> #include <stdbool.h>:
    debug.h
    uart.h
    sysctl.h
    interrupt.h
    i2c.h
     
    Also updated names of I2Cn_MASTER_BASE to I2Cn_BASE in library.
    Gona post the library updated now with these notes
  10. Like
    L.R.A reacted to spirilis in Did any driverlib in stellaris change?   
    I'm guessing they're using TivaWare now, btw, since the Tiva-C is supported.
     
    Check this out- http://www.ti.com/lit/an/spma050a/spma050a.pdf
    Migrating Software Projects from StellarisWare
  11. Like
    L.R.A reacted to spirilis in PWM changes depending on the code it's running   
    Ok:
    #include <wiring_private.h> void setup() { // put your setup code here, to run once: pinMode(PF_0, OUTPUT); } void loop() { // put your main code here, to run repeatedly: PWMWrite(PF_0, 256, 200, 15000); while(1) delay(100); } Saleae Logic16 shows a waveform with width=52.1uS, period=66.68uS, frequency = 14.997KHz.  Pretty close.  52.1/66.68 = 0.781343, 256*0.781343 = 200.02 so that looks right.
     
    Running this:
    #include <wiring_private.h> void setup() { // put your setup code here, to run once: pinMode(PF_0, OUTPUT); } void loop() { // put your main code here, to run repeatedly: PWMWrite(PF_0, 256, 200, 15000); delay(100); } ...produces ALMOST the same thing, but every 100ms there's a single pulse whose width is 101.65uS instead of the typical 52.1uS.
     
    Running this:
    #include <wiring_private.h> void setup() { // put your setup code here, to run once: pinMode(PF_0, OUTPUT); } void loop() { // put your main code here, to run repeatedly: PWMWrite(PF_0, 256, 200, 15000); } Produces no waveform at all; the signal goes HIGH after Energia starts and then stays there with no transitions.
  12. Like
    L.R.A reacted to spirilis in PWM changes depending on the code it's running   
    Taking a look at this one, is there a good reason why you are merely delay(100)'ing and then letting loop() exit (thus letting Energia re-run it, including re-running the PWMWrite() function) after using PWMWrite?  PWMWrite mucks with a bunch of registers, so it's possible you're interrupting the PWM process every 100ms (based on your delay) and interfering with its ability to do its job.
     
    Sounds like PWMWrite should be run at the end of setup()...
     
    The first example continuously re-runs the PWMWrite() function, causing a similar issue I bet.
  13. Like
    L.R.A reacted to spirilis in PWM changes depending on the code it's running   
    Yeah that should work.  I have a Tiva-C LP and a Saleae Logic16 with me right now ... I'll try running that later and see what it gets.  It has 100MHz sampling capability when using up to 3 signals so it should be able to measure this with good accuracy.
  14. Like
    L.R.A got a reaction from reaper7 in [Energia Library] I2C_API on Energia   
    *This is untested and needs testing, i don't have access to any I2C devices currently infortunaly, only next week*
     
     
    I ran into this while exploring stellaris features:
    http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/235926.aspx
     
    It's a very nice API to use the 4 I2C modules in the stellarpad.
    Since i had some problems with the Wire library, both getting diferent modules to work or get proper data from a srf08/srf10 i decided to implement this on my energia files.
     
    It ended up like this:
    https://meocloud.pt/link/5ab528a8-fb5a-4be4-b8f3-29d687b1f52a/Energia
    This is what you have to add to make it work. It includes a utils/uartstdio
     
    Gona test a bit with some I2C sensors i have but it would be nice to someone test them with some other I2C ICs.
     
    Any sugestions would be appreciated
     
    PS: i just made some tweaks so it works like a library in Energia for the Stellarpad. I take no credit for the API made since it exists for quite some time.
     
    Ok now it's tested and working and here it's in the link i pasted in the previous reply. But how do i actualy make a download link for the zip like i see other people do?
     
    It includes a working example with srf08. In this one i can get distances over the 70cm and until the max range of it and also i get very stable values (i had this problem with wire library, limited until 70cm and very erratic values).
     
    It supports all I2C modules in both 100kbps and 400kbps mode.
    The original API includes a search for bus function but it isn't working here.
     
    Also i have a problem. It doesnt unable the library to work but it should be done in other way.
     
    I had to add in the I2C_Stellaris_API.cpp so i could use multiple modules, any module besides I2C0 has mux
        #define GPIO_PD1_I2C3SDA 0x00030403
        #define GPIO_PD0_I2C3SCL 0x00030003
        #define GPIO_PE4_I2C2SCL 0x00041003
        #define GPIO_PE5_I2C2SDA 0x00041403
        #define GPIO_PA7_I2C1SDA 0x00001C03
        #define GPIO_PA6_I2C1SCL 0x00001803
    But this is in "driverlib/pin_map.h". 
    Anyone can help me with that?
     
     
    TODO (or untested),
    Use multime I2C modules at the same time
    Make it work with MAX6956 
     
     
    UPDATES
    So with energia 0101E0011 an update is needed.
    QuadUSBUart.pdf
     
    Updates: 
     Updated names of I2Cn_MASTER_BASE to I2Cn_BASE in library.
       
    Needed changes in Energia files:
    Driverlib files that needed adding #include <inttypes.h> #include <stdbool.h>:
    debug.h
    uart.h
    sysctl.h
    interrupt.h
    i2c.h
     
    This is becouse those files now use unint32_t and bool, so they need those includes
  15. Like
    L.R.A got a reaction from energia in Stellaris default clock is rong on Energia?   
    But try this, the delay should be of 1 second but it actualy is 2seconds.
    #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "driverlib/sysctl.h" #include "driverlib/gpio.h" double tempo=0; void setup() { SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3); } void loop() { GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_1, GPIO_PIN_1); tempo=(80000000/3); ROM_SysCtlDelay(tempo); GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_1,GPIO_PIN_0); tempo=(80000000/3); ROM_SysCtlDelay(tempo); } EDIT:
    It's weird now it seems ok :/
    But i made like 5 tests and it was 2sec
  16. Like
    L.R.A reacted to MarkAYoder in Energia interface to TLC5940 16-LED driver   
    Hi:
      I have a nice start on a driver for the TLC5940 16-LED PWM driver.  It uses the UART to send the bits to the TLC5940.
     
    The next step is to turn this into a library...
     
    --Mark
     
     
    TLC5940_UART_working3.ino
  17. Like
    L.R.A got a reaction from brainwash in Veroboard for msp430 in my club   
    First i would like to clarify why i'm making this board
     
    I'm in a robotics club. It only uses microcontrolers modules designed for basic. I wanted to change that.
    I realy like Texas microcontrolers for the price and it was more easy for me to use the hardware than with arduino.
    With Energia it is easy to program the basics and still learn C++ wich is a better preparation for future of the students involved.
     
    First of all thanks for making Energia. It let me create alot of small projects wich i couldn't with arduino (problems with programing external chips). It also lets me learn C assembly little by little since MSP430 is originaly programed in that but still use C++ when i just don't know.
     
    I'm creating like a manual for the new ones that join know how to work with C++ in Energia and basics for electronics, all in my native language. Also translating all examples to portuguese
    In all that i'm also designing a Veroboard for msp430 because the launchpad is a little limited for some robots. The board includes I2C converter with mosfets, a led RGB and 1 push button. It has also lots of pins to supply current to sensors and motors with 5V, 3.3V or direct from 2 diferent power supplies.
    It's in veroboard because it's the only ones it can made in the club.
    I wanted to share to anyone who wants it since it doesn't need any PCB. Any sugestions are welcome

  18. Like
    L.R.A got a reaction from chibiace in Veroboard for msp430 in my club   
    First i would like to clarify why i'm making this board
     
    I'm in a robotics club. It only uses microcontrolers modules designed for basic. I wanted to change that.
    I realy like Texas microcontrolers for the price and it was more easy for me to use the hardware than with arduino.
    With Energia it is easy to program the basics and still learn C++ wich is a better preparation for future of the students involved.
     
    First of all thanks for making Energia. It let me create alot of small projects wich i couldn't with arduino (problems with programing external chips). It also lets me learn C assembly little by little since MSP430 is originaly programed in that but still use C++ when i just don't know.
     
    I'm creating like a manual for the new ones that join know how to work with C++ in Energia and basics for electronics, all in my native language. Also translating all examples to portuguese
    In all that i'm also designing a Veroboard for msp430 because the launchpad is a little limited for some robots. The board includes I2C converter with mosfets, a led RGB and 1 push button. It has also lots of pins to supply current to sensors and motors with 5V, 3.3V or direct from 2 diferent power supplies.
    It's in veroboard because it's the only ones it can made in the club.
    I wanted to share to anyone who wants it since it doesn't need any PCB. Any sugestions are welcome

  19. Like
    L.R.A got a reaction from Rickta59 in Veroboard for msp430 in my club   
    First i would like to clarify why i'm making this board
     
    I'm in a robotics club. It only uses microcontrolers modules designed for basic. I wanted to change that.
    I realy like Texas microcontrolers for the price and it was more easy for me to use the hardware than with arduino.
    With Energia it is easy to program the basics and still learn C++ wich is a better preparation for future of the students involved.
     
    First of all thanks for making Energia. It let me create alot of small projects wich i couldn't with arduino (problems with programing external chips). It also lets me learn C assembly little by little since MSP430 is originaly programed in that but still use C++ when i just don't know.
     
    I'm creating like a manual for the new ones that join know how to work with C++ in Energia and basics for electronics, all in my native language. Also translating all examples to portuguese
    In all that i'm also designing a Veroboard for msp430 because the launchpad is a little limited for some robots. The board includes I2C converter with mosfets, a led RGB and 1 push button. It has also lots of pins to supply current to sensors and motors with 5V, 3.3V or direct from 2 diferent power supplies.
    It's in veroboard because it's the only ones it can made in the club.
    I wanted to share to anyone who wants it since it doesn't need any PCB. Any sugestions are welcome

  20. Like
    L.R.A got a reaction from energia in RGB mixing colors   
    i made sometigh similar some weeks ago:
    http://www.youtube.com/watch?v=TLAxCZtJGwk
    http://www.youtube.com/watch?v=kp90JBe8HKA
     
    2 buttons for each color like semicolo said
  21. Like
    L.R.A got a reaction from canibalimao in RGB mixing colors   
    The first is manual. The second is automatic. It has both possibilitys
     
    if you want a 3 button i have a sugestion.
     
    use 2. 1 increasses, another one decreasses.
    The 3rd one cycles wich color your actualy controlling.
    You can add 1-3 leds to show wich collor is selected to control. Just use a digital pin for them. Or not. It also works without them
     
    This about the size of my manual board:
    http://lusorobotica.com/index.php?action=dlattach;topic=6087.0;attach=1973;image
  22. Like
    L.R.A reacted to Rei Vilo in [SOLVED] Software / Bit-bang I2C library for Energia   
    LRA: please have a look at http://embeddedcomputing.weebly.com/isup2c-logic-level-converter.html'>I
  23. Like
    L.R.A reacted to Rei Vilo in [SOLVED] Software / Bit-bang I2C library for Energia   
    This library only implements I
  24. Like
    L.R.A reacted to Rei Vilo in new msp430g2955 with energia   
    Thank you and good luck with your competition!
  25. Like
    L.R.A got a reaction from JWoodrell in New (soon to be) valueline chip. MSP430G2955 56kb Flash 4kb Ram!   
    i found this board with a msp430g2955 and a msp430g2744
    http://www.ti.com/tool/MSP-TS430DA38#buy
     
    it's in the store altough unavailable to order. alredy asked when it's in stock. don't realy want the board. i want the uControlers in it :-P
×
×
  • Create New...