Jump to content

Chypsylon

Members
  • Content Count

    9
  • Joined

  • Last visited

About Chypsylon

  • Rank
    Noob Class

Profile Information

  • Gender
    Not Telling
  • Location
    Austria
  1. Chypsylon

    Stellaris launchpad power options

    Yes, but you have to keep in mind that the 7.2V is only the nominal voltage rating, when the battery is fully charged it'll have around 8.2V and when fully depleted 6.6V (discharging beyond this point can damage the battery). When we look into the Datasheet of the standard 5V regulator 7805 we see that the dropout voltage is typically 2V (but this can vary slightly due to manufacturing). The dropout voltage is the minimum difference required between input and output voltage for the regulator to work. While 7.2V - 5V = 2.2V is still slightly higher than required, you risk the regulator shutting off as the battery discharges more. The output voltage is also rather noisy when operating this close to the limits, so this could be an issue as well depending on what else you power with it. What you need is a regulator with a lower dropout voltage, these are usually called "low drop out" or "LDO". There're tons of different models, with minor differences, so just look what your favorite supplier has available. Common ones are for example LM2940CT, LM2931T, L4940V5. Another alternative would be a DC-DC step down converter like this or search ebay for some cheap chinese one. They have a much higher efficiency than linear regulators and therefore don't produce as much heat and drain the battery slower but the downside is that they're usually more expensive as well.
  2. Chypsylon

    Stellaris launchpad power options

    My power source was a 11.1V LiPo-Battery with a linear regulator (common 7805 thingy) which outputs about 5V (it was something like 4.9V, so well within the required range). What exactly do you want to do and what are your requirements?
  3. Chypsylon

    Stellaris launchpad power options

    I've successfully powered it via the VBUS pin in the pinheader I don't know about the unpopulated hole in the bottom though, you might want to check with a multimeter/in the schematic
  4. Chypsylon

    Watchdog

    I was able to get it working using the functions from the original Stellarisware driver. #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "driverlib/sysctl.h" #include "driverlib/eeprom.h" #include "driverlib/watchdog.h" #include "driverlib/interrupt.h" void setup() {} void loop() { //Watchdog Stuff SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0); SysCtlPeripheralReset(SYSCTL_PERIPH_WDOG0); if(WatchdogLockState(WATCHDOG0_BASE) == true) { WatchdogUnlock(WATCHDOG0_BASE); } WatchdogReloadSet(WATCHDOG0_BASE, ROM_SysCtlClockGet()); WatchdogResetEnable(WATCHDOG0_BASE); WatchdogEnable(WATCHDOG0_BASE); //IntMasterEnable(); //IntEnable(INT_WATCHDOG); while(1) { WatchdogIntClear(WATCHDOG0_BASE); //do stuff } } My only remaining problem is that I need to know when the watchdog triggered a reset. There must be some way to read the Reset Source at startup but I couldn't find anything on that :/ Alternatively I could use the Watchdog ISR, but as far as I understand it, it has to be defined in the vector table in "startup_gcc.c" and implemented in "WInterrupts.c". But these files are compiled at startup of Energia (I'm running on the latest git version), so I've got no way to pass variables between it and my main file :?
  5. Chypsylon

    Watchdog

    Is there any watchdog functionality implemented in Energia?
  6. Chypsylon

    Cutting Connection between PD1 and PB7

    Thanks, I just cut the traces with a scalpel. Everything's working now.
  7. After an hour of debugging (RTFM, I know...) I finally found out that PD1 and PB7 as well as PD0 and PB6 are connected with a 0-Ohm resistor. Can I just remove them/cut the traces to have the pins working individually or'll I break something? Why are they connected anyway?
  8. Chypsylon

    I2C - SRF10 and Stellaris

    Sorry for my late reply, I somehow expected to get an email if someones writing in this topic :/ I can't remember if I was able to get readings beyond 45cm but I know it's possible as I've done it using another microcontroller. You might want to experiment with different Gain- and Range-Values (see Datasheet). The values, in the sensor I've tried with, were probably already changed from the default values. Good luck and report your findings here
  9. Chypsylon

    I2C - SRF10 and Stellaris

    This code worked for me (sligthly adapted from the examples provided). Please note that my I2C-Adress is not the default one and that you have to convert the 8bit Sensor-adress to 7bit e.g shift by one bit. I also had to use the I2C-Module 1, the others wouldn't work for me. #include <Wire.h> #define SENSOR_ADRESS 115 void setup() { Wire.setModule(1); Wire.begin(); // join i2c bus (address optional for master) Serial.begin(9600); // start serial communication at 9600bps } int reading = 0; void loop() { Serial.println("begin transmission"); // step 1: instruct sensor to read echoes Wire.beginTransmission(SENSOR_ADRESS); // transmit to device #112 (0x70) // the address specified in the datasheet is 224 (0xE0) // but i2c adressing uses the high 7 bits so it's 112 Wire.write(byte(0x00)); // sets register pointer to the command register (0x00) Wire.write(byte(0x51)); // command sensor to measure in "inches" (0x50) // use 0x51 for centimeters // use 0x52 for ping microseconds Wire.endTransmission(); // stop transmitting // step 2: wait for readings to happen delay(70); // datasheet suggests at least 65 milliseconds // step 3: instruct sensor to return a particular echo reading Wire.beginTransmission(SENSOR_ADRESS); // transmit to device #112 Wire.write(byte(0x02)); // sets register pointer to echo #1 register (0x02) Wire.endTransmission(); // stop transmitting // step 4: request reading from sensor Wire.requestFrom(SENSOR_ADRESS, 2); // request 2 bytes from slave device #112 // step 5: receive reading from sensor if(2 <= Wire.available()) // if two bytes were received { reading = Wire.read(); // receive high byte (overwrites previous reading) reading = reading << 8; // shift high byte to be high 8 bits reading |= Wire.read(); // receive low byte as lower 8 bits //Serial.println(reading); // print the reading } //delay(250); // wait a bit since people have to read the output } /* // The following code changes the address of a Devantech Ultrasonic Range Finder (SRF10 or SRF08) // usage: changeAddress(0x70, 0xE6); void changeAddress(byte oldAddress, byte newAddress) { Wire.beginTransmission(oldAddress); Wire.write(byte(0x00)); Wire.write(byte(0xA0)); Wire.endTransmission(); Wire.beginTransmission(oldAddress); Wire.write(byte(0x00)); Wire.write(byte(0xAA)); Wire.endTransmission(); Wire.beginTransmission(oldAddress); Wire.write(byte(0x00)); Wire.write(byte(0xA5)); Wire.endTransmission(); Wire.beginTransmission(oldAddress); Wire.write(byte(0x00)); Wire.write(newAddress); Wire.endTransmission(); } */
×