Jump to content

BravoV

Members
  • Content Count

    33
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    BravoV got a reaction from Smakkemeken in Say Hi for a Giveaway entry.   
    Hi !
  2. Like
    BravoV reacted to spirilis in The Datasheet "Book Club"   
    Ok so this was an idea that came to mind last night; These datasheets and related documents are huge, and sometimes have surprising & interesting details nestled into their labyrinth-like chapters.  Why not start a thread for sharing noteworthy details?  No need to be a pack of lone wolves about these things...
     
    I'll start - with the TM4C123GH6PM datasheet: http://www.ti.com/lit/ds/symlink/tm4c123gh6pm.pdf
     
    Reading through Chapter 2 yesterday, "The Cortex-M4F Processor", a few details stuck out that I hadn't realized before-
     
    1. Didn't realize there is a 16-bit SIMD vector processing unit.  How do you access/use it from GCC I wonder?
     
    2. Debug - SWV, Serial Wire Viewer, is a feature where you can export a stream of software-generated messages, data trace, profiling information.  Software-generated messages -- How do we access that?  I assume we need OpenOCD to use this feature, but is there an API for writing to this debug interface?
     
    3. Like most complicated processors, there is a notion of "privileged" vs "unprivileged" execution modes.  The Cortex-M4F extends this further by declaring two operational modes too--"Thread" mode (i.e. normal application runtime, either privileged or unprivileged) and "Handler" mode, exclusively privileged and only available as the context for ISR handlers.
     
    4. Coming from MSP430 land, I'm always looking for analogies to the MSP430 in here.  The equivalent for the "GIE" (global interrupt enable) bit is the PRIMASK register; when bit0 is set, it disables all interrupts (of configurable priority, so RESET/NMI/Fault interrupts still fire).  This is important for sleep modes below...
     
    5. Interrupt priorities run from 0-7, with *lower* numbers being of "higher" priority.  Default priority for all interrupts is 0 (the highest).  BASEPRI register declares the minimum priority required to fire, and besides setting 0 (=no exceptions masked), the setting masks all interrupts of that priority and those higher in number ("lower" in priority).
     
    6. The CONTROL register has an interesting bit, "FPCA", which will adjust the latency for entering an interrupt ISR; it determines whether or not the Floating Point Unit's registers should be pushed onto the stack during ISR entry or not.  This makes a substantial difference, as seen on page 109; the difference between FPCA=1 exception frame and FPCA=0 exception frame is many-fold.  So folks not using floating point would do well to keep that disabled (not 100% sure how GCC handles this yet, i.e. whether there's a builtin, a TivaWare ROM_* function or if you have to do an inline ASM code).
     
    7. Bit-banding is available for everything; flash, SRAM, peripherals.  I think TivaWare has some macros to make that easy, need to look into it.  It's a feature for doing single atomic writes or reads to a single bit of any byte in the address space, by writing/reading a 32-bit word (0x00000000 for bit 0, 0x00000001 for 1).
     
    8. The Cortex-M4F provides two user IRQs for operating system support; SVCall (Supervisor Call) and PendSV (pendable, interrupt-driven request for system-level service--typically used for context switching).
     
    9. Sleep modes.  The Cortex-M4F uses instruction-based sleep entries, but it has some features that allow the MSP430's "event driven" paradigm too.
    9a. WFI = Wait For Interrupt, goes to sleep and will wake up only if an unmasked interrupt occurs.
    ** Sometimes waking requires a common "clean-up" or reinitialization routine to run; to support this, your app would enter WFI inside an idle loop with PRIMASK enabled so that the CPU wakes up, but does not enter the ISR right away; does its cleanup work; then disables PRIMASK so the Cortex immediately jumps to the highest-priority IRQ's ISR.
    9b. WFE = Wait For Event, goes to sleep and will wake up if ANY interrupt occurs, even if it's masked; If it is masked, the CPU will not branch to its ISR but just continue from the point where the WFE instruction occurred.  If it is unmasked, then the CPU will jump to the ISR immediately.
    9c. Sleep-on-Exit; if the SLEEPEXIT bit of SYSCTRL is set, then the CPU will return to sleep mode after servicing ISRs.  Similar to MSP430's LPM modes if the ISR does not issue a __bic_SR_register_on_exit(LPMx_bits); type of call.
     
    That's all for now.  Chapter 3 later today.
  3. Like
    BravoV got a reaction from abecedarian in A new Tiva C LaunchPad about to be Announced!!!!!   
    Here .. some teaser to cool your nerves down. 
     

  4. Like
    BravoV got a reaction from spirilis in A new Tiva C LaunchPad about to be Announced!!!!!   
    Here .. some teaser to cool your nerves down. 
     

  5. Like
    BravoV got a reaction from Smakkemeken in Google+ Ti Stellaris Launchpad   
    +1 , its like ... "Hi ... I'm nobody, just create a new hang out place for Tiva C/ Stellaris launchpad community, I don't have anything special to offer, its you that have to contribute first, join us"
     
    Just another fucking spammer, ban and delete please.
     
     
  6. Like
    BravoV got a reaction from dhewgill1426459865 in FREE TI Launchpad ... hurry !   
    UPDATE : It looks like the coupon code is no longer valid.
    -- ADMIN EDIT--

    Below is a statement from TI.
     
     
     --ADMIN EDIT
    Ok, not actually free, but I think this deal should be good enough for everybody, just see for yourself my invoice below, not bad eh ? 
     
    A 25$ coupon code from Texas Instruments.

    Coupon code: National-1yr
    Its valid until 30-September.
    https://estore.ti.com
     
    Ordered two EK-TM4C123GXL launchpads for just $0.98 and with free shipping ! 
     

  7. Like
    BravoV got a reaction from reaper7 in FREE TI Launchpad ... hurry !   
    UPDATE : It looks like the coupon code is no longer valid.
    -- ADMIN EDIT--

    Below is a statement from TI.
     
     
     --ADMIN EDIT
    Ok, not actually free, but I think this deal should be good enough for everybody, just see for yourself my invoice below, not bad eh ? 
     
    A 25$ coupon code from Texas Instruments.

    Coupon code: National-1yr
    Its valid until 30-September.
    https://estore.ti.com
     
    Ordered two EK-TM4C123GXL launchpads for just $0.98 and with free shipping ! 
     

  8. Like
    BravoV got a reaction from Fred in FREE TI Launchpad ... hurry !   
    UPDATE : It looks like the coupon code is no longer valid.
    -- ADMIN EDIT--

    Below is a statement from TI.
     
     
     --ADMIN EDIT
    Ok, not actually free, but I think this deal should be good enough for everybody, just see for yourself my invoice below, not bad eh ? 
     
    A 25$ coupon code from Texas Instruments.

    Coupon code: National-1yr
    Its valid until 30-September.
    https://estore.ti.com
     
    Ordered two EK-TM4C123GXL launchpads for just $0.98 and with free shipping ! 
     

  9. Like
    BravoV got a reaction from nemetila in FREE TI Launchpad ... hurry !   
    UPDATE : It looks like the coupon code is no longer valid.
    -- ADMIN EDIT--

    Below is a statement from TI.
     
     
     --ADMIN EDIT
    Ok, not actually free, but I think this deal should be good enough for everybody, just see for yourself my invoice below, not bad eh ? 
     
    A 25$ coupon code from Texas Instruments.

    Coupon code: National-1yr
    Its valid until 30-September.
    https://estore.ti.com
     
    Ordered two EK-TM4C123GXL launchpads for just $0.98 and with free shipping ! 
     

  10. Like
    BravoV got a reaction from Automate in FREE TI Launchpad ... hurry !   
    UPDATE : It looks like the coupon code is no longer valid.
    -- ADMIN EDIT--

    Below is a statement from TI.
     
     
     --ADMIN EDIT
    Ok, not actually free, but I think this deal should be good enough for everybody, just see for yourself my invoice below, not bad eh ? 
     
    A 25$ coupon code from Texas Instruments.

    Coupon code: National-1yr
    Its valid until 30-September.
    https://estore.ti.com
     
    Ordered two EK-TM4C123GXL launchpads for just $0.98 and with free shipping ! 
     

  11. Like
    BravoV got a reaction from PTB in FREE TI Launchpad ... hurry !   
    UPDATE : It looks like the coupon code is no longer valid.
    -- ADMIN EDIT--

    Below is a statement from TI.
     
     
     --ADMIN EDIT
    Ok, not actually free, but I think this deal should be good enough for everybody, just see for yourself my invoice below, not bad eh ? 
     
    A 25$ coupon code from Texas Instruments.

    Coupon code: National-1yr
    Its valid until 30-September.
    https://estore.ti.com
     
    Ordered two EK-TM4C123GXL launchpads for just $0.98 and with free shipping ! 
     

  12. Like
    BravoV got a reaction from Rei Vilo in FREE TI Launchpad ... hurry !   
    UPDATE : It looks like the coupon code is no longer valid.
    -- ADMIN EDIT--

    Below is a statement from TI.
     
     
     --ADMIN EDIT
    Ok, not actually free, but I think this deal should be good enough for everybody, just see for yourself my invoice below, not bad eh ? 
     
    A 25$ coupon code from Texas Instruments.

    Coupon code: National-1yr
    Its valid until 30-September.
    https://estore.ti.com
     
    Ordered two EK-TM4C123GXL launchpads for just $0.98 and with free shipping ! 
     

  13. Like
    BravoV got a reaction from bluehash in Tiva-C shipping times   
    I thought they're shipping now ? 
     
    Mine arrived at early July, though it was ordered back in mid April, posted the box pic here -> http://forum.stellarisiti.com/topic/580-tiva-sighting/page-2#entry3409
  14. Like
    BravoV reacted to bluehash in Noritake 800b 128x64 VFD Interface - Stellaris Launchpad   
    I had a 128x64 Noritake VFD display at work, which is currently not being used. Did an extensive search for a driver until I found one by Henri Skippari. Code was ported from a a PIC16F877. Took a couple of hours for me to port and wire it up.
     
    Below is the code which will need stellarisware.
    /* * Noritake VFD 800B 128x64 Parallel Interface * Code courtesy : http://www.sourceboost.com/Products/C2C-plus/ExampleCode/noritake/noritake.c.html * Original author : Henri Skippari * Ported to Stellaris Launchpad : Gerard S, 12th August, 2013 */ #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "inc/hw_gpio.h" #include "driverlib/gpio.h" #include "driverlib/pin_map.h" #include "driverlib/sysctl.h" #include "driverlib/systick.h" #include "driverlib/gpio.h" #include "driverlib/sysctl.h" #include "utils/uartstdio.h" #include "utils/ustdlib.h" #define LAYER0_ON 1 #define LAYER0_OFF 0 #define LAYER1_ON 1 #define LAYER1_OFF 0 #define DISPLAY_ON 1 #define DISPLAY_OFF 0 #define REVERSE_ON 1 #define REVERSE_OFF 0 #define MODE_AND 0 #define MODE_EXOR 1 #define MODE_OR 2 #define VERTICAL_ON 1 #define VERTICAL_OFF 0 #define HORIZONTAL_ON 1 #define HORIZONTAL_OFF 0 #define D7 0x80 #define D6 0x40 #define D5 0x20 #define D4 0x10 #define D3 0x08 #define D2 0x04 #define D1 0x02 #define D0 0x01 #define VFD_CONTROL_PERIPH SYSCTL_PERIPH_GPIOA #define VFD_CONTROL_BASE GPIO_PORTA_BASE #define VFD_WR GPIO_PIN_2 #define VFD_CD GPIO_PIN_3 #define VFD_RD GPIO_PIN_4 #define VFD_CSS GPIO_PIN_5 #define VFD_WR_HI HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_WR << 2)) = VFD_WR #define VFD_WR_LO HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_WR << 2)) = 0 #define VFD_CD_HI HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_CD << 2)) = VFD_CD #define VFD_CD_LO HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_CD << 2)) = 0 #define VFD_RD_HI HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_RD << 2)) = VFD_RD #define VFD_RD_LO HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_RD << 2)) = 0 #define VFD_CSS_HI HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_CSS << 2)) = VFD_CSS #define VFD_CSS_LO HWREG(VFD_CONTROL_BASE + GPIO_O_DATA + (VFD_CSS << 2)) = 0 #define VFD_DATA_PERIPH SYSCTL_PERIPH_GPIOB #define VFD_DATA_BASE GPIO_PORTB_BASE #define VFD_DATA GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | \ GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 | // Fonts, first part const unsigned char font5x7[]={ 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xF2,0x00,0x00, 0x00,0xC0,0x00,0xC0,0x00, 0x28,0xFE,0x28,0xFE,0x28, 0x24,0x54,0xFE,0x54,0x48, 0xC4,0xC8,0x10,0x26,0x46, 0x6C,0x92,0x9A,0x64,0x0A, 0x00,0xA0,0xC0,0x00,0x00, 0x00,0x38,0x44,0x82,0x00, 0x00,0x82,0x44,0x38,0x00, 0x28,0x10,0x7C,0x10,0x28, 0x10,0x10,0x7C,0x10,0x10, 0x0A,0x0C,0x00,0x00,0x00, 0x10,0x10,0x10,0x10,0x10, 0x06,0x06,0x00,0x00,0x00, 0x04,0x08,0x10,0x20,0x40, 0x7C,0x8A,0x92,0xA2,0x7C, 0x00,0x42,0xFE,0x02,0x00, 0x42,0x86,0x8A,0x92,0x62, 0x84,0x82,0xA2,0xD2,0x8C, 0x18,0x28,0x48,0xFE,0x08, 0xE4,0xA2,0xA2,0xA2,0x9C, 0x3C,0x52,0x92,0x92,0x0C, 0x80,0x8E,0x90,0xA0,0xC0, 0x6C,0x92,0x92,0x92,0x6C, 0x60,0x92,0x92,0x94,0x78, 0x00,0x6C,0x6C,0x00,0x00, 0x00,0x6A,0x6C,0x00,0x00, 0x10,0x28,0x44,0x82,0x00, 0x28,0x28,0x28,0x28,0x28, 0x00,0x82,0x44,0x28,0x10, 0x40,0x80,0x8A,0x90,0x60, 0x4C,0x92,0x9E,0x82,0x7C, 0x3E,0x48,0x88,0x48,0x3E, 0xFE,0x92,0x92,0x92,0x6C, 0x7C,0x82,0x82,0x82,0x44, 0xFE,0x82,0x82,0x44,0x38, 0xFE,0x92,0x92,0x82,0x82, 0xFE,0x90,0x90,0x90,0x80, 0x7C,0x82,0x92,0x92,0x5C, 0xFE,0x10,0x10,0x10,0xFE, 0x00,0x82,0xFE,0x82,0x00, 0x04,0x02,0x82,0xFC,0x80, 0xFE,0x10,0x28,0x44,0x82, 0xFE,0x02,0x02,0x02,0x02, 0xFE,0x40,0x20,0x40,0xFE, 0xFE,0x20,0x10,0x08,0xFE, 0x7C,0x82,0x82,0x82,0x7C, 0xFE,0x90,0x90,0x90,0x60, 0x7C,0x82,0x8A,0x84,0x7A, 0xFE,0x90,0x98,0x94,0x62 // 50 }; // Fonts, second part const unsigned char font5x7_2[]={ 0x64,0x92,0x92,0x92,0x4C, 0x80,0x80,0xFE,0x80,0x80, 0xFC,0x02,0x02,0x02,0xFC, 0xF8,0x04,0x02,0x04,0xF8, 0xFC,0x02,0x0C,0x02,0xFC, 0xC6,0x28,0x10,0x28,0xC6, 0xE0,0x10,0x0E,0x10,0xE0, 0x86,0x8A,0x92,0xA2,0xC2, 0x00,0xFE,0x82,0x82,0x00, 0x40,0x20,0x10,0x08,0x04, 0x00,0x82,0x82,0xFE,0x00, 0x20,0x40,0x80,0x40,0x20, 0x02,0x02,0x02,0x02,0x02, 0x00,0x80,0x40,0x20,0x00, 0x04,0x2A,0x2A,0x2A,0x1E, 0xFE,0x12,0x12,0x12,0x0C, 0x1C,0x22,0x22,0x22,0x22, 0x0C,0x12,0x12,0x12,0xFE, 0x1C,0x2A,0x2A,0x2A,0x1A, 0x10,0x7E,0x90,0x40,0x00, 0x12,0x2A,0x2A,0x2A,0x3C, 0xFE,0x10,0x10,0x10,0x0E, 0x00,0x00,0x5E,0x00,0x00, 0x04,0x02,0x02,0xBC,0x00, 0xFE,0x08,0x14,0x22,0x00, 0x00,0x82,0xFE,0x02,0x00, 0x3E,0x20,0x18,0x20,0x3E, 0x3E,0x10,0x20,0x20,0x1E, 0x1C,0x22,0x22,0x22,0x1C, 0x3E,0x28,0x28,0x28,0x10, 0x10,0x28,0x28,0x28,0x3E, 0x3E,0x10,0x20,0x20,0x10, 0x12,0x2A,0x2A,0x2A,0x24, 0x20,0xFC,0x22,0x04,0x00, 0x3C,0x02,0x02,0x02,0x3C, 0x38,0x04,0x02,0x04,0x38, 0x3C,0x02,0x0C,0x02,0x3C, 0x22,0x14,0x08,0x14,0x22, 0x20,0x12,0x0C,0x10,0x20, 0x22,0x26,0x2A,0x32,0x22, 0x10,0x6C,0x82,0x82,0x00, 0x12,0x7E,0x92,0x82,0x42, 0x00,0x82,0x82,0x6C,0x10, 0x80,0x80,0x80,0x80,0x80, 0xFE,0xFE,0xFE,0xFE,0xFE}; // 44 /* Write data byte */ void VFD_WriteData(unsigned char data) { VFD_CD_LO; VFD_WR_LO; VFD_RD_HI; VFD_CSS_LO; GPIOPinWrite( VFD_DATA_BASE, 0xFF, data); VFD_CD_LO; VFD_WR_HI; VFD_RD_HI; VFD_CSS_LO; } /* Write command byte */ void VFD_WriteCtrl(unsigned char command) { VFD_CD_HI; VFD_WR_LO; VFD_RD_HI; VFD_CSS_LO; GPIOPinWrite( VFD_DATA_BASE, 0xFF, command); VFD_CD_HI; VFD_WR_HI; VFD_RD_HI; VFD_CSS_LO; } /* Horizontal and vertical address auto increment on/off */ void VFD_AddressIncrementMode(unsigned char h, unsigned char v) { unsigned char bit2=0, bit1=0; if(h==HORIZONTAL_ON) bit2 = 0x04; if(v==VERTICAL_ON) bit1 = 0x02; VFD_WriteCtrl(0x80+bit2+bit1); } void VFD_SetColumn(unsigned char column) { VFD_WriteCtrl(0x64); VFD_WriteCtrl(column); } void VFD_SetRow(unsigned char row) { VFD_WriteCtrl(0x60); VFD_WriteCtrl(row); } /* Display brightness 0-15 */ void VFD_SetBrightness(unsigned char brightness) { if(brightness>15) brightness=15; // Check for too big values if(brightness<0) brightness=0; // Check for too small values VFD_WriteCtrl(0x40+(0x0F-brightness)); // Delay for 100ms SysCtlDelay( (SysCtlClockGet()/(3*1000))*1 ); } void VFD_ClearDisplay(void) { VFD_WriteCtrl(0x5f); SysCtlDelay( (SysCtlClockGet()/(3*1000))*1 ); } /* Set layers on/off + other display attributes */ void VFD_DisplaySetup(char layer0, char layer1, char gfx_on_off, char reverse, char mode) { unsigned char l0=0, l1=0, gs=0, grv=0, and=0, exor=0; if(layer0==LAYER0_ON) l0 = D2; if(layer1==LAYER1_ON) l1 = D3; VFD_WriteCtrl(0x20+l0+l1); if(gfx_on_off==DISPLAY_ON) gs = D6; if(reverse==REVERSE_ON) grv = D4; if(mode==MODE_AND) and = D3; if(mode==MODE_EXOR) exor = D2; if(mode==MODE_OR) { } VFD_WriteCtrl(gs+grv+and+exor); } unsigned char swap(unsigned char x) { unsigned char result=0,mask1=1,mask2=128; int b; for(b=0;b<8;b++) { if ((x&mask1)==mask1) result=result+mask2; mask1=mask1<<1; mask2=mask2>>1; } return(result); } void VFD_PrintChar(unsigned char chr) { unsigned char data, i; VFD_AddressIncrementMode(HORIZONTAL_ON, VERTICAL_OFF); // Horizontal auto increment ON for font writing chr=chr-0x20; // Convert ascii code to Noritake code if(chr<51) // First font array { for(i=0;i<5;i++) { data = font5x7[chr*5+i]; data = swap(data); VFD_WriteData(data); } VFD_WriteData(0); } else if(chr<96) // Second font array { chr = chr-51; for(i=0;i<5;i++) { data = font5x7_2[chr*5+i]; data = swap(data); VFD_WriteData(data); } VFD_WriteData(0); } } void VFD_Init( void ) { unsigned char i; SysCtlPeripheralEnable(VFD_CONTROL_PERIPH); GPIOPinTypeGPIOOutput(VFD_CONTROL_BASE, VFD_WR | \ VFD_CD | \ VFD_RD | \ VFD_CSS); SysCtlPeripheralEnable(VFD_DATA_PERIPH); GPIOPinTypeGPIOOutput(VFD_DATA_BASE, 0xFF); for(i=0;i<8;i++) { // address area set VFD_WriteCtrl(0x62); VFD_WriteCtrl(i); VFD_WriteData(0xff); } VFD_AddressIncrementMode(HORIZONTAL_ON, VERTICAL_OFF); // Default to horizontal address increment ON VFD_SetColumn(0); // Set address pointer to (0,0) VFD_SetRow(0); // Set address pointer to (0,0) VFD_SetBrightness(0); // Set brightness to lowest possible VFD_DisplaySetup(LAYER0_OFF, LAYER1_OFF, DISPLAY_OFF, REVERSE_OFF, MODE_AND); // Set everything OFF VFD_ClearDisplay(); } /* Draw vertical bar. Used in the sample.*/ void DrawVertBar(unsigned char height, unsigned char pos) { unsigned char i; VFD_AddressIncrementMode(HORIZONTAL_OFF, VERTICAL_ON); // Vertical bars are drawn so vertical auto increment is enabled VFD_SetColumn(pos); VFD_SetRow(7-height); for(i=7-height;i<8;i++) { VFD_WriteData(254); // Draw vertical byte with one bit off: oxxxxxxx // Address pointer is incremented vertically after every byte written } } int main(void) { int i, j, c; // Setup the processor clock at 80Mhz. SysCtlClockSet( SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | \ SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); // Enable UART0 @115200bps N81. SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); GPIOPinConfigure(GPIO_PA0_U0RX); GPIOPinConfigure(GPIO_PA1_U0TX); GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); UARTStdioInit(0); //Clear the terminal UARTprintf("\033[2J"); UARTprintf("\n\nNoritake VFD 800b test\n"); UARTprintf("-----------------------------------\n"); // Arrays to store height and current direction for moving bars unsigned char value[16]; // Height of bar, 0 to 8 unsigned char dir[16]; // 1=up, 0=down // Initialize values for bars for(i=0;i<8;i++) { value[i]=i; // 8 bars with values from 0 to 7 dir[i]=1; // Going up value[8+i]=(8-i); // 8 bars with values from 8 to 1 dir[8+i]=0; // Going down } VFD_Init(); VFD_DisplaySetup(LAYER0_ON, LAYER1_ON, DISPLAY_ON, REVERSE_OFF, MODE_OR); VFD_SetBrightness(15); // Set brightness to maximum // Write all available fonts to display // Change row after 20 characters c=32; for(i=0;i<5;i++) { VFD_SetColumn(0); VFD_SetRow(8+i); // Start from the beginning of second layer for(j=0;j<20;j++) { VFD_PrintChar(c++); } } SysCtlDelay( (SysCtlClockGet()/(3*1000))*1000 ); while( 1 ) { // Draw some moving bars on the display for(i=0;i<16;i++) { for(j=0;j<8;j++) { DrawVertBar(value[i], i*8); } if(value[i]>=8) dir[i]=0; else if(value[i]<=0) dir[i]=1; if(dir[i]==0) value[i]=value[i]-1; else if(dir[i]==1) value[i]=value[i]+1; } SysCtlDelay( (SysCtlClockGet()/(3*1000))*50 ); VFD_ClearDisplay(); } return 0; }
  15. Like
    BravoV got a reaction from Rei Vilo in Which chip revision in your EK-LM4F120XL Stellaris Launchpad ?   
    Just curious if anyone got newer or even older one , my board is using the e"X"perimental release LX4F120H5QR with revision A3.
     
    Fyi, the link for latest errata document, LM4F120H5QR RevA1/A3 Errata (Rev. D) document -> http://www.ti.com/litv/pdf/spmz611d

  16. Like
    BravoV reacted to calendar in [Energia Library] MAX7219 / MAX7221Led Controller Library   
    Hello all,   Today I am going to share a library of mine that I just developed it recently. For any inputs/ideas/thoughts/bug reports, I am very welcome  . I might also update my library whenever there is any request.   Hardware needed: 1. Stellarpad 2. MAX7219 / MAX7221 system with 8x8 led.   This library interfaces with Maxim integrated MAX7219 whose interface is also compatible with MAX7221. I ve also included two examples. The first one is just to put random pattern on the 8x8 led. The second one is to cycle through all characters that I also included in font.h   I hope this contribution is meaningful    Best Regards,         Eryacard  
    Example1: Random Pattern

     
    Example 2: A to Z (E for Energia!)

    MAX7219.zip
  17. Like
    BravoV got a reaction from bluehash in Tiva sighting   
    Spotted at the latest Stellaris LM4F120H5QR Rev A1/A3/B0 Errata document dated April 2013, weird huh ?  
     
    Link -> http://www.ti.com/lit/er/spmz611g/spmz611g.pdf
     

  18. Like
    BravoV got a reaction from bluehash in Tiva sighting   
    Ok, its confirmed, Tiva is the new name and all LM4xx part numbers will be replaced with new TM4xxx.
     
    Source , Tiva C Series ARM Cortex-M Microcontrollers ->  http://www.ti.com/litv/pdf/spmt284
     
    Also in the new datasheet for TM4C123GH6PM (available thru TI site) used in this new Tiva Launchpad, stated it is identical to LM4F230H5QR, go figure. So now it has built in PWM and QEI module that Stellaris Launchpad doesn't have since its using lower end chip LM4F120H5QR.
     
    So no more "Stellaris" ?  
  19. Like
    BravoV got a reaction from bluehash in Which chip revision in your EK-LM4F120XL Stellaris Launchpad ?   
    New erratas, for the rev Ax series.
     
    Stellaris LM4F120H5QR Rev A1/A3 Errata (Rev. F) dated 11 Mar 2013 -> http://www.ti.com/litv/pdf/spmz611f
     
    also TI separated the revision Bx series into different document
     
    Stellaris LM4F120H5QR Rev B0/B1 Errata same date -> http://www.ti.com/litv/pdf/spmz764
     
     
    So its been a while, anyone received other than A3 chip ? 
  20. Like
    BravoV reacted to Bingo600 in Which chip revision in your EK-LM4F120XL Stellaris Launchpad ?   
    Just got the 2 new ones , also LX chips. 
    But i never would have guessed they they were that hancicapped :-(
    http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/t/233624.aspx
     
    TI says timerbased port toggle is a No..No on the current chips
     
    Well it was cheap.
     
    /Bingo
  21. Like
    BravoV reacted to dellwoodbu in [Work-around] Stellaris Launchpad USB Serial example not enumerating correctly   
    If you download the full StellarisWare package http://www.ti.com/tool/sw-lm3s you should be easily able to port the usb_dev_mouse example from the EK-LM3S9D90 or EK-LM3S9D92 (for this example they are identical). The primary USB difference between the LM3S9D9x and the LM4F120H5QR is that the LM4F uses muxing on the GPIO / USB pins. The LM3S9D9x had dedicated USB pins. To make the examples work configure the GPIO pin muxing for USB mode near the beginning of your code. Something like the below should get you pretty close.
     

    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); // enable the GPIO port so we can configure it GPIOPinTypeUSBAnalog(GPIO_PORTD_BASE, GPIO_PIN_4 | GPIO_PIN_5); // setup the port to be in USB analog mode. Routes incoming signals to on chip USB PHY USBStackModeSet(0, USB_MODE_FORCE_DEVICE, 0); // Tells the USB stack to always be a device. Needed since some Stellaris devices running same software stack can be OTG or Host and this chip doesn't have a VBUS pin.
  22. Like
    BravoV got a reaction from bluehash in Which chip revision in your EK-LM4F120XL Stellaris Launchpad ?   
    Just curious if anyone got newer or even older one , my board is using the e"X"perimental release LX4F120H5QR with revision A3.
     
    Fyi, the link for latest errata document, LM4F120H5QR RevA1/A3 Errata (Rev. D) document -> http://www.ti.com/litv/pdf/spmz611d

  23. Like
    BravoV got a reaction from bluehash in Latest CCS released at Nov 19, 2012   
    Just spotted today.
     
    Latest :

    CCSv5.3.x
    Release : 5.3.0
    Built # : 5.3.0.00083
    Date : Nov 19, 2012  
     
    Previous :

    CCSv5.2.x
    Release : 5.2.1
    Built # : 5.2.1.00018
    Date : July 16, 2012  
    Link -> http://processors.wi...hp/Download_CCS
  24. Like
    BravoV got a reaction from Rickta59 in Latest CCS released at Nov 19, 2012   
    Just spotted today.
     
    Latest :

    CCSv5.3.x
    Release : 5.3.0
    Built # : 5.3.0.00083
    Date : Nov 19, 2012  
     
    Previous :

    CCSv5.2.x
    Release : 5.2.1
    Built # : 5.2.1.00018
    Date : July 16, 2012  
    Link -> http://processors.wi...hp/Download_CCS
  25. Like
    BravoV got a reaction from bluehash in Which chip revision in your EK-LM4F120XL Stellaris Launchpad ?   
    Not sure, the reason I'm asking this is after reading the errata document that I pointed at the 1st post, it mentions there is a B0 revision which is newer than A3 like ours.
     
    Just read it youself, there are still few nasty bugs that already fixed in B0 revision, but not in early rev at A1 and A3.
×
×
  • Create New...