Jump to content
43oh

morry

Members
  • Content Count

    19
  • Joined

  • Last visited

Reputation Activity

  1. Like
    morry got a reaction from Sahil in Can not save the received characters of UART to a string   
    Please note that this statement does not allocate any memory for your received string:
    char stringrecv[]="";  
    There could be strange effects when your code gets more complex since the memory area of your stringrecv array is not protected and could be overwritten by other variables.
      An common solution is to define a fixed buffer size: #define UART0_BUFFER_SIZE 32 ... char stringrecv[uART0_BUFFER_SIZE]; //32 bytes will be reserved for this array ...
  2. Like
    morry got a reaction from bluehash in Distinguish between TimerPrescaleSet vs TimerLoadSet   
    Hi!
     
    Prescaler (in simple words) means that the clock driving your Timer is divided by 500 - your timer counts 500 times slower than the system clock speed.
    Let's assume a system clock of 80Mhz: 80Mhz / 500 = 160kHz  --> 1/160kHz = 6,25µs for one counter step.
     
    Your Timer is loaded with a start value of 60000 and counts down to 0.
    So you have 60000 steps * 6,25µs = 0.375s - that is your timer period for one full count from 60000 downto 0.
     
    Or as equation - easy to adapt for different values of Prescaler, TimerLoad and System Clock:
    TimerPeriod = 60000 * 500 / 80MHz.
  3. Like
    morry got a reaction from spirilis in CAN Booster Pack   
    Yeah it's beast.   Top speed will not be that high, it's not required in the formula student contests. Top speed is 130km/h (80mph).
    Acceleration is what this car is made for: 0-100km/h (0-60mph) in under 4 seconds.
     
    Engine torque has to be controlled at any time, especially while starting to accelerate. At the moment we produce the steel frame, our drivetrain is already running on a test setup at our university.
     
    I'll put some updates here, especially when the launchpad stuff gets implemented.
  4. Like
    morry got a reaction from dubnet in CAN Booster Pack   
    That's a nice project, spirilis!
    It's good to see that you could get the MSP430 connected to CAN via the MCP2515! Does the MCP2515 all the CAN Error handling (error counters, error bus off state) on its own?
     
    We aim only for the Stellaris/Tiva-Launchpad because of the built in CAN module, easy programming, API is well documented. MSP430 is no option for us at the moment.
    Our application is a Formula student electric racing car - two high power permanent magnet motors (100kW peak each , total power is limited to 85kW by the Formula Student rules) with Stellaris Launchpads everywhere (battery management system master controller, Sensor-to-CAN-boosters, Gyro-booster,...).
     

     
    Greetings from Germany!
    Moritz
  5. Like
    morry reacted to spirilis in CAN Booster Pack   
    FYI- Been making headway with my updated CAN BoosterPack, got a pair of MSP430's talking with it using the Microchip MCP2515 SPI CAN Controller.  At least now I've vetted out the transceiver hardware & power delivery chips as working correctly.  Should work fine with the Tiva-C and Hercules.
     
    Waiting until the new year (budget-wise) to order more parts to build out the rest of these & sell them.  Probably using the 43oh store for this.
     
    My progress is being documented over at 43oh - http://forum.43oh.com/topic/4202-can-boosterpack/
  6. Like
    morry reacted to spirilis in CAN Booster Pack   
    Neat, I have a CAN bpak project in flight (well, stalled atm due to lack of time but soon) that is geared towards RJ45-attached CAN sensor networks. My thread is on 43oh.
  7. Like
    morry reacted to miceuz in CAN bus boosterpacks   
    Hi all,
     
    I've made a couple of CAN bus boosterpack designs: https://github.com/Miceuz/can-boosterpack/
    One employs MCP2551 and another one is fully isolated using ISO1050. Feel free to download and build them, the designs are home PCB manufacturing friendly.



    I'm considering ordering some boards and putting them on tindie.com. Would someone be interested in buying a ready made board?
  8. Like
    morry got a reaction from bluehash in Carrera Slot Car Timer using Stellaris Launchpad   
    Hey guys,
     
    this was my very first project on the awesome TI Stellaris Launchpad.
    I don't know if these Carrera Slot Cars are famous all over the world, but in Germany this was a Must-Have for every kids toy collection. :-)

    (Picture from Wikipedia, looping is missing ;-) ).
     
    You set two cars on the track and control their speed with a small controller.
    The fastest car wins the race but main goal is actually to stay on track. 
     
    1. The Mission
    I wanted to have a display, that shows me the current time for each track and the best driven time for each track.
     
    2. How to detect the cars?
    After some considerations about light switches etc. I realized that the cars are hold on track by a small magnet in the back of each car. Perfect for use with Reed-Contacts.
    In the picture you can see the mechanical lap counter and the adaptor board to the Stellaris launchpad. The Reed contacts are mounted from the bottom side next to each track.

     
    3. Display
    There might be good LCD-libraries even for Cortex M4, but for better learning I decided to write my own routines for the display.
    It's a 4 Line LCD with a KS0066 controller (HD44780 compatible) in "good old" 4Bit mode.
    Here's the display with the launchpad adaptor board (and poti for contrast control):

     
    4. The code
    Basically there are two timers set to 1ms intervall, one for each track.
    The reed contacts trigger a GPIO-interrupt, which starts the timers.
    A third timer sets a displayrefresh-flag, which is polled in the main loop.
     
    Here is the code as CCS-Project: https://dl.dropbox.com/u/773191/TI/carrera/carrera.zip
     
    5. LCD-Library
    If you want to use a KS0066 or HD44780-Display, here are my LCD.c and LCD.h for it:
    https://dl.dropbox.com/u/773191/TI/carrera/LCD.c
    https://dl.dropbox.com/u/773191/TI/carrera/LCD.h
    Works also for displays with 1 or 2 lines of course.

     
    6. Some more pictures
    "The Sandwich":

     
    Complete setup:

     
     
    Greets
    Moritz
  9. Like
    morry reacted to hnaoab in [ ENDED ] Jan-Feb 2013 - Stellarisiti Project of the Month Contest   
    Hi!
     
    I want to Join this Contest, my project's name is Minni Lab:
     
     
    ABSTRACT
                Mini Lab project aims to provide students with cheap multi-function tool for their learning and even further studying in Electronics. Mini Lab’s center is  Stellaris LM3S3749, a MCU of  Texas Instrument company, and it’s also equipped with touchscreen which will make the user interface becomes more visual and easy to use. Especially, Mini Lab’s hardware is designed to be able to upgrade easily, still have necessary features but keep low price.
     
    Video:

     
    Code:
    http://www.mediafire.com/?2ls2hcyhgb87b34 (Use Keil C)
    Schematic:
    http://www.mediafire.com/?0xm4gz216cdctjp (Use Eagle layout)
     
    More Infomation: http://www.mediafire.com/view/?08djf38vt71f4v4 (Use Power Point 2010)
     
    Main topic:http://www.diendanti.com/showthread.php?469-Chia-s%E1%BA%BB-d%E1%BB%B1-%C3%A1n-Mini-Lab (the Language is Vietnamese)
  10. Like
    morry got a reaction from bluehash in Using Stellaris Launchpad as a Thermometer   
    Hey guys,
     
    I'm new to Stellaristi, awesome forum! I really love my Stellaris Launchpad, since it keeps me away from dealing with nasty register bit settings. 
     
    I developed the same application as nemetila and found his solution yesterday, but my Windows Application is by far not as nice as yours. ;-)

    The Applications receives the temperature from a selectable serial port and displays it. 270 means 27.0°C.
     
    Clicking on Red, Green and Blue lights the Launchpad LED in the matching color (just by sending 'R', 'G', or 'B' char via UART).
     

    I connect to my PC via JY-MCU UART-Bluetooth Module from China (http://dx.com/p/jy-mcu-arduino-bluetooth-wireless-serial-port-module-104299) on UART3. Took me a long long way to figure out, that PD7 on UART2 is used for supply voltage monitoring on the Launchpad so this UART is not usable without additional coding. Next problem: Uartstdio.h supports only UART0-UART2, so I had to enhance this library a bit to use it for UART3.
    I couldn't use UART1, because their pins are used by the LCD...
     

     
    Additionaly I use a Nokia 5110 Display module via SSI (as well very cheap from China http://dx.com/p/replacement-1-6-lcd-screen-with-blue-backlight-for-nokia-5110-blue-145860 )
     
    Nice thing about Bluetooth is connectivity to mobile devices such as Android Phones. With "Bluetooth SPP"-App i could easily connect to the Launchpad UART and display the temperature-vaules on my Android phone.

    Nice and simple, R, G and B-commands also work.
     
    I will do some code cleanup and share it with you here.
     
    Moritz
  11. Like
    morry got a reaction from nemetila in Using Stellaris Launchpad as a Thermometer   
    Hey guys,
     
    I'm new to Stellaristi, awesome forum! I really love my Stellaris Launchpad, since it keeps me away from dealing with nasty register bit settings. 
     
    I developed the same application as nemetila and found his solution yesterday, but my Windows Application is by far not as nice as yours. ;-)

    The Applications receives the temperature from a selectable serial port and displays it. 270 means 27.0°C.
     
    Clicking on Red, Green and Blue lights the Launchpad LED in the matching color (just by sending 'R', 'G', or 'B' char via UART).
     

    I connect to my PC via JY-MCU UART-Bluetooth Module from China (http://dx.com/p/jy-mcu-arduino-bluetooth-wireless-serial-port-module-104299) on UART3. Took me a long long way to figure out, that PD7 on UART2 is used for supply voltage monitoring on the Launchpad so this UART is not usable without additional coding. Next problem: Uartstdio.h supports only UART0-UART2, so I had to enhance this library a bit to use it for UART3.
    I couldn't use UART1, because their pins are used by the LCD...
     

     
    Additionaly I use a Nokia 5110 Display module via SSI (as well very cheap from China http://dx.com/p/replacement-1-6-lcd-screen-with-blue-backlight-for-nokia-5110-blue-145860 )
     
    Nice thing about Bluetooth is connectivity to mobile devices such as Android Phones. With "Bluetooth SPP"-App i could easily connect to the Launchpad UART and display the temperature-vaules on my Android phone.

    Nice and simple, R, G and B-commands also work.
     
    I will do some code cleanup and share it with you here.
     
    Moritz
  12. Like
    morry reacted to nemetila in Using Stellaris Launchpad as a Thermometer   
    Hi,   Here is my first project with Stellaris Launchpad. This is a very simple thermometer, that uses the internal temperature sensor of the Stellaris MCU for temperature measuring, and the UART_0 module for sending data to a PC application. The PC application displays the current temperature in °C numerically and graphically (acts as a logger).     Short Description:   In every two seconds the MCU:
    measures the temperature with ADC:ADC with 4 Samples and FIFO Depth Each FIFO with 64X Hardware Sample Averaging ADC Speed: 250 KS/s calculates the average and the temperature data in °C:Only integer math is used sends data to the PC:UART_0 module, TX only Baud Rate 115200 kbit/s Data format: „C”         -> real temp 23.56978°C        Data format: „dC”       -> real temp 23.56978°C        sent data: „236dC” Data format: „cC”       -> real temp 23.56978°C        sent data: „2357cC” and then enters to hibernation:Hibernation reduces self heating Wake from hibernation by RTC or WAKE_PIN  
    LED indicators:
    BLUE:  start from cold reset GREEN: start from hibernation by RTC (indicates run mode) RED: start from hibernation by WAKE_PIN  
    Source Code:
     
    I used CCS 5.3 with StellarisWare to create the source code. Here is the full project:Stellaris_v01.zip
    Install CCS 5 and StellarisWare.
    Download and extract the *.zip file, then start CCS and use "Project"->"Import existing CCS Eclipse Project".
    Browse the extracted "Stellaris_v01" directory and click "Finish". Build Project then debug.
     
     
    I developed the PC application in C# with Visual Studio 2012, in Windows 8. The release files:
    Release.zip
     
    I updated my PC application. New features:
    error corrections users can select between Celsius [°C] and Fahrenheit [°F] temperature scale The release files: http://forum.stellarisiti.com/index.php?app=core&module=attach&section=attach&attach_id=309
     
    The source files: https://copy.com/4DkJpd4O49ky
     
     
    Requirements:
    Stellaris LM4F120 LaunchPad (no additional hardware is needed) Windows OS with .NET Framework 4 (for PC app.)  
    A firmware for the MSP430 LaunchPad (MSP430G2553) with additional features(selectable averaging, supply voltage mesurement) is also available to the same PC application.
    The source code: main.c

     
    Important notes:
    „Getting Started with the Stellaris ® EK-LM4F120XL LaunchPad Workshop”: "Code Composer Studio has some issues connecting to hibernating devices (and reconnecting) since they essentially power off in the middle of the debugging process.We’ll try to step around those issues, but you may see CCS terminate abruptly. If this
    happens, you can restart CCS and try again, or you can use the LM Flash Programmer to reprogram the device with the qs-rgb (non-hibernation) program. In either case, you need to hold SW2 down to keep the LM4F device awake in order for either tool to connect."
    I am new to ARM(Stellaris).
    Some of the hibernation API functions is not clear to me.
    Sorry for my English 
    Regards,
    Laszlo
     
    Updated: 02 June 2014
×
×
  • Create New...