SlideShare a Scribd company logo
1 of 33
Running head: UNIT V CASE STUDY 1
UNIT V CASE STUDY 2
Case One: ElectriGov
Donnie Lewis
Team Building
Waldorf College
The Abilene Paradox
1. Why is it important for an organization to have a mission?
2. Why is it important for team members to know their roles on
a team?
3. Is competition within a team a good or bad thing? Explain
your response.
4. Why is it important to set short- and long-term goals when
planning a meeting regarding conflicts? Provide examples.
5. Why is it significant for leaders to understand how to resolve
conflict and avoid unhealthy agreements?
Case One: ElectriGov
ElectriGov is a government agency whose mission is to supply
electric power to various locations within the United States. The
organization has three “line crews” whose job it is to install
high-voltage power lines.
The work is hard, dirty, and dangerous. Almost all of the men
have had a friend who has been
seriously injured or killed while on the job. The crews typically
work independently, but when there are large projects to
complete, the crews must work together. This can create serious
conflicts, since the crews often don’t agree with each other’s
approaches to organizing and managing a particular job, and
none of the three foremen want to be subservient to the others.
Thus when doing large projects together, the line crews tend to
compete with one another, rather
than cooperate.
On one project, the conflict became so nasty that one crew
failed to inform another crew that the wires were “hot” at a
certain section of the project. This serious safety breach was
reported to senior management, who immediately launched an
investigation. We, as consultants, initially were asked to serve
as part of the team investigating the causes of the safety
violations. After the initial investigation, we were asked by
ElectriGov’s senior management to “clean up the conflicts”
between the crews.
The approach we used to help the crews reduce their conflicts
was a variation on design A. All three crews were brought
together in one room, and the need for an interteam-
development program was discussed. Each crew was asked to
commit to solving the conflicts between themselves and the
other crews and to agree to give the program a chance. Once
this agreement was achieved, each crew was then asked to meet
separately to list their perceptions of the
other crews and the specific problems that they had in working
with the other crews. After meeting separately, the teams were
brought back together and each crew reported its perceptions of
the other crews.
In our consulting role, we facilitated the discussion, making
sure that each crew’s perceptions were made clear and that each
crew described the problematic behaviors of the other crews in
concrete, specific terms. As a ground rule, crews were asked to
be descriptive and to avoid using emotionally laden language
when critiquing the other crews. After each crew presented its
perceptions of the other crews, the other crews could ask
questions to clarify points that were made, but the crews were
not allowed to debate the validity of the other crews’
perceptions.
After each crew aired their views, the crews were then asked to
come up with recommendations to improve the relationship
between crews. Their suggestions were listed on large poster
boards in the room. The crews discussed how they might do
more advanced planning on the larger projects to determine who
would do what and who would be in charge of the project. They
also considered rotating crew members to improve relationships
between rews. At the end of this interteam-building session,
each crew made a public commitment to change its behavior and
implement the recommendations that were made. As a result of
this intervention, the hostility between the crews decreased and
the crews now have a new approach to working with each other
on large projects that minimizes the conflicts that they had in
the past.
Reference
McShane, S. L., & Von Glinow, M. A. (2013). Organizational
behavior (6th Ed.).
New York, NY: McGraw-Hill/Irwin.
EECE 237 S15 - Lab 4. (XC).pdf
EECE 237 Spring 2015
Homework Assignment #4 – Display scrolling, button press
detection (Extra Credit)
Assignment:
Starting with the template file (on the BbLearn page), create a
program that uses the supplied
LCD_scroll() function to scroll a text message on the LCD
display both left and right. A single button
press should cause the display to scroll one position. A double
press (two button presses with 1
second) should cause the direction of the scrolling to change.
The first press will move the display
one position to the right, and every single press after that will
continue to move it to the right. When
a double press occurs, the direction of the text shift changes, so
every single press after that will shift
the text that direction. The LED circle should also move a
single lit LED clockwise each time the
display is shifted right, and counter-clockwise each time the
display is shifted left.
• Use the LCD_scroll() function to shift the display left or right
(do not rewrite it each time)
• The display should be shifting right at the start of execution
• Use the constants defined for the RIGHT and LEFT direction
settings (to call LCD_scroll() )
• Use the defined PRESS_TIME constant to define the maximum
number of ticks between the
two button presses for a double press (do not change the value)
• Do not worry about the display scrolling off the screen (if you
keep scrolling in the same
direction for about 10 steps, it will wrap back onto the screen)
• The time measurement should be based on SysTickInterrupts.
• All delays should be based on this Timer (No count delay
loops)
• The button press must be interrupt based (not polled)
Deliverables:
1) Source code for solution program: C source file - submitted
via BbLearn page. (Do not submit other project
files). The file MUST be named as follows:
<first initial>_<last name>_hw4.c
for example, mine would be d_word_hw4.c
The source code file must contain your name and student ID in
the header block at the top of the page, and
should be commented enough to be easy to read
Due Date:
Friday, May 15th – Assignment must be submitted to BbLearn
by 8pm.
__MACOSX/._EECE 237 S15 - Lab 4. (XC).pdf
EECE 237 S15 Lab4 Template.c
//
// EECE 237 S15
// Lab 4 (XC) template
//
//includes for the project
#include "stm32F30x.h"
#include "STM32f3_discovery.h"
#include "stm32f30x_gpio.h"
#include "stm32f30x_i2c.h"
#include "stm32f3_discovery_lsm303dlhc.h"
#include "stm32f3_discovery_l3gd20.h"
#include "main.h"
#include "stdio.h"
#include "string.h"
// Constants -----------------------------------
#define SYSTICK_MASK 0xF000
#define TIM3_MASK 0x0F00
#define RIGHT 0
#define LEFT 1
RCC_ClocksTypeDef RCC_Clocks;
GPIO_InitTypeDef GPIO_InitStructure;
void IO_Init(void);
void I2C_init(void);
void I2C2_init(void);
void Timer3_Init(void);
unsigned int TIM3_tick_count = 0;
unsigned int tick_count = 0;
volatile int ButtonPressed = 0;
void LCD_write(int,int, char);
void LCD_clear(void);
void LCD_contrast(int); // Contrast level = 1..50
void LCD_backlight(int); // Backlight level = 1..8
void LCD_scroll (int); // Scroll 1 space RIGHT or
LEFT
void Delay(uint32_t nTime);
static __IO uint32_t TimingDelay;
char message[16];
char ready_msg[] = " Ready....";
int main(void) {
int i;
IO_Init();
Timer3_Init();
I2C2_init();
while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) != RESET);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
LCD_contrast(40);
LCD_backlight(6);
LCD_clear();
for (i=0; i < 10; i++)
LCD_write(0, i, ready_msg[i]); // Write
"Ready..."
tick_count = 0;
while (!ButtonPressed);
ButtonPressed = 0;
GPIOE->ODR = 0;
while(1){
sprintf(message, "Ticks = %5i", tick_count);
for (i=0; i < strlen(message); i++)
LCD_write(0, i, message[i]); //
Display number on 1st line of display
tick_count = 0;
while (!ButtonPressed);
ButtonPressed = 0;
//GPIOE->ODR = (((++j%8)< 7) ? (0x0200 << (j%8)) :
(0x0200 >> (8 - (j%8))));
LCD_clear();
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
void IO_Init() {
EXTI_InitTypeDef EXTI_InitStructure;
GPIO_InitTypeDef GPIO_InitStructure;
NVIC_InitTypeDef NVIC_InitStructure;
/* SysTick end of count event each 1ms */
RCC_GetClocksFreq(&RCC_Clocks);
SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000);
/* GPIOE Periph clock enable */
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOE,
ENABLE);
/* Configure PE14 and PE15 in output pushpull mode */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15 |
GPIO_Pin_14 | GPIO_Pin_13 | GPIO_Pin_12
| GPIO_Pin_11| GPIO_Pin_10| GPIO_Pin_9| GPIO_Pin_8;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
//GPIO_PuPd_NOPULL
GPIO_Init(GPIOE, &GPIO_InitStructure);
/* GPIOA Periph clock enable */
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,
ENABLE);
/* Configure PA0 in input mode */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Configure PA8 in output mode */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_PinAFConfig(GPIOA, GPIO_PinSource8,
GPIO_AF_7); // TIM1_CH1 -> Pin A8
/* Enable GPIOA clock */
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,
ENABLE);
/* Configure PA0 pin as input floating */
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Enable SYSCFG clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG,
ENABLE);
/* Connect EXTI0 Line to PA0 pin */
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA,
EXTI_PinSource0);
/* Configure EXTI0 line */
EXTI_InitStructure.EXTI_Line = EXTI_Line0;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);
/* Enable and set EXTI0 Interrupt to the lowest priority */
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority =
0x0F;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
void I2C2_init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
I2C_InitTypeDef I2C_InitStructure;
RCC_I2CCLKConfig(RCC_I2C2CLK_SYSCLK);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2,
ENABLE);
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,
ENABLE);
GPIO_PinAFConfig(GPIOA, GPIO_PinSource9,
GPIO_AF_4);
GPIO_PinAFConfig(GPIOA, GPIO_PinSource10,
GPIO_AF_4);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
GPIO_Init(GPIOA, &GPIO_InitStructure);
I2C_DeInit(I2C2);
I2C_InitStructure.I2C_Mode = I2C_Mode_I2C;
I2C_InitStructure.I2C_AnalogFilter =
I2C_AnalogFilter_Enable;
I2C_InitStructure.I2C_DigitalFilter = 0x00;
I2C_InitStructure.I2C_Ack = I2C_Ack_Enable;
I2C_InitStructure.I2C_AcknowledgedAddress =
I2C_AcknowledgedAddress_7bit;
I2C_InitStructure.I2C_Timing = 0xC062121F;
I2C_Init(I2C2, &I2C_InitStructure);
I2C_Cmd(I2C2, ENABLE);
}
//
// Scroll LCD Display - Direction should be LEFT or RIGHT
//
void LCD_scroll(int direction) {
I2C_TransferHandling(I2C2, 0x50 , 3,
I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0xFE);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
if (direction == LEFT)
I2C_SendData(I2C2, 0x55);
else
I2C_SendData(I2C2, 0x56);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
Delay(20);
}
void LCD_write(int row, int col, char data) {
// Move to sepcified row, col
//while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) !=
RESET);
I2C_TransferHandling(I2C2, 0x50 , 3,
I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0xFE);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0x45);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
if (!row) // if row == 0
I2C_SendData(I2C2, col);
else // else row asumed to be 1
I2C_SendData(I2C2, (0x40 + col));
I2C_TransferHandling(I2C2, 0x50 , 1,
I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, data);
}
//
// Set LCD Contrast - Level should be 1..50 (Seems to work
best if > 35)
//
void LCD_contrast(int level) {
//while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) !=
RESET);
I2C_TransferHandling(I2C2, 0x50 , 3,
I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0xFE);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0x52);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, level);
Delay(20);
}
//
// Set LCD Backlight - Level should be 1..8 (Seems to work
best if > 1)
//
void LCD_backlight(int level) {
//while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) !=
RESET);
I2C_TransferHandling(I2C2, 0x50 , 3,
I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0xFE);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0x53);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, level);
Delay(20);
}
void LCD_clear() {
//while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) !=
RESET);
I2C_TransferHandling(I2C2, 0x50 , 2,
I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0xFE);
while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) ==
RESET);
I2C_SendData(I2C2, 0x51);
Delay(20);
}
void Timer3_Init(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
/* TIM3 clock enable */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3,
ENABLE);
TIM_TimeBaseStructure.TIM_Period = 50000;
TIM_TimeBaseStructure.TIM_Prescaler =
(SystemCoreClock/1000000)-1;
TIM_TimeBaseStructure.TIM_ClockDivision =
TIM_CKD_DIV1;
TIM_TimeBaseStructure.TIM_CounterMode =
TIM_CounterMode_Up;
TIM_TimeBaseInit(TIM7, &TIM_TimeBaseStructure);
/* Enable the TIM3 gloabal Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority =
0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
TIM_ARRPreloadConfig(TIM3, ENABLE);
/* TIM3 enable counter */
TIM_Cmd(TIM3, ENABLE);
TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE);
}
//
// Timer 3 Interrupt Handler
//
void TIM3_IRQHandler(void) {
TIM3_tick_count++;
if (!(TIM3_tick_count % 200))
GPIOE->ODR ^= TIM3_MASK;
TIM_ClearITPendingBit(TIM3, TIM_IT_Update);
}
/**
* @brief Inserts a delay time.
* @param nTime: specifies the delay time length, in
milliseconds.
* @retval None
*/
void Delay(uint32_t nTime)
{
TimingDelay = nTime;
while(TimingDelay != 0);
}
/**
* @brief Decrements the TimingDelay variable.
* @param None
* @retval None
*/
void TimingDelay_Decrement(void)
{
if (TimingDelay != 0x00)
{
TimingDelay--;
}
}
void SysTick_Handler(void)
{
TimingDelay_Decrement();
tick_count++;
if (!(tick_count % 200))
GPIOE->ODR ^= SYSTICK_MASK;
}
void EXTI0_IRQHandler(void)
{
if (EXTI_GetITStatus(USER_BUTTON_EXTI_LINE) == SET)
{
ButtonPressed = 1;
/* Clear the EXTI line 0 pending bit */
EXTI_ClearITPendingBit(USER_BUTTON_EXTI_LINE);
}
}
__MACOSX/._EECE 237 S15 Lab4 Template.c

More Related Content

Similar to Running head UNIT V CASE STUDY1UNIT V CASE STUDY2.docx

Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
King Lo
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
King Lo
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
King Lo
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
King Lo
 
Lab Assignment 2 Introduction Applying statistic.docx
Lab Assignment 2  Introduction  Applying statistic.docxLab Assignment 2  Introduction  Applying statistic.docx
Lab Assignment 2 Introduction Applying statistic.docx
smile790243
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
King Lo
 

Similar to Running head UNIT V CASE STUDY1UNIT V CASE STUDY2.docx (14)

Contoh Essay Ide Bisnis. Online assignment writing service.
Contoh Essay Ide Bisnis. Online assignment writing service.Contoh Essay Ide Bisnis. Online assignment writing service.
Contoh Essay Ide Bisnis. Online assignment writing service.
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
 
Essay On Importance Of Education In My Life
Essay On Importance Of Education In My LifeEssay On Importance Of Education In My Life
Essay On Importance Of Education In My Life
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
 
Pg. 01 question four assignment #1deadline tuesd
Pg. 01 question four assignment #1deadline tuesdPg. 01 question four assignment #1deadline tuesd
Pg. 01 question four assignment #1deadline tuesd
 
HCI
HCI HCI
HCI
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
 
Lab Assignment 2 Introduction Applying statistic.docx
Lab Assignment 2  Introduction  Applying statistic.docxLab Assignment 2  Introduction  Applying statistic.docx
Lab Assignment 2 Introduction Applying statistic.docx
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
 
Operations research.pptx
Operations research.pptxOperations research.pptx
Operations research.pptx
 
Growing Up Essay Ideas.pdfGrowing Up Essay Ideas
Growing Up Essay Ideas.pdfGrowing Up Essay IdeasGrowing Up Essay Ideas.pdfGrowing Up Essay Ideas
Growing Up Essay Ideas.pdfGrowing Up Essay Ideas
 
I Thought YOU Were Flying the Plane: Preventing Projects from Falling Out of ...
I Thought YOU Were Flying the Plane: Preventing Projects from Falling Out of ...I Thought YOU Were Flying the Plane: Preventing Projects from Falling Out of ...
I Thought YOU Were Flying the Plane: Preventing Projects from Falling Out of ...
 
Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)Training of agile project management with scrum king leong lo (100188178)
Training of agile project management with scrum king leong lo (100188178)
 

More from joellemurphey

Eastern European countries appear to have become dependent on Ru.docx
Eastern European countries appear to have become dependent on Ru.docxEastern European countries appear to have become dependent on Ru.docx
Eastern European countries appear to have become dependent on Ru.docx
joellemurphey
 
EAS 209 Second Response Paper Topic Assignment Due .docx
EAS 209 Second Response Paper Topic Assignment Due .docxEAS 209 Second Response Paper Topic Assignment Due .docx
EAS 209 Second Response Paper Topic Assignment Due .docx
joellemurphey
 
EarlyIntervention Strategies Paper (15 points)The pu.docx
EarlyIntervention Strategies Paper (15 points)The pu.docxEarlyIntervention Strategies Paper (15 points)The pu.docx
EarlyIntervention Strategies Paper (15 points)The pu.docx
joellemurphey
 
Early scholarly and philosophical manuscripts were in Greek. However.docx
Early scholarly and philosophical manuscripts were in Greek. However.docxEarly scholarly and philosophical manuscripts were in Greek. However.docx
Early scholarly and philosophical manuscripts were in Greek. However.docx
joellemurphey
 
Early Learning & Developmental Guidelines July 2017 1 .docx
Early Learning & Developmental Guidelines July 2017 1 .docxEarly Learning & Developmental Guidelines July 2017 1 .docx
Early Learning & Developmental Guidelines July 2017 1 .docx
joellemurphey
 
Early Innovations and Their Impact Today Wilbur and Orville Wrig.docx
Early Innovations and Their Impact Today Wilbur and Orville Wrig.docxEarly Innovations and Their Impact Today Wilbur and Orville Wrig.docx
Early Innovations and Their Impact Today Wilbur and Orville Wrig.docx
joellemurphey
 
Early Constitutional ControversiesIn 1788, Alexander Hamilton and .docx
Early Constitutional ControversiesIn 1788, Alexander Hamilton and .docxEarly Constitutional ControversiesIn 1788, Alexander Hamilton and .docx
Early Constitutional ControversiesIn 1788, Alexander Hamilton and .docx
joellemurphey
 
Earlier this semester, you participated in a class discussion about .docx
Earlier this semester, you participated in a class discussion about .docxEarlier this semester, you participated in a class discussion about .docx
Earlier this semester, you participated in a class discussion about .docx
joellemurphey
 
EAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docx
EAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docxEAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docx
EAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docx
joellemurphey
 
Earlean, please write these notes for me. October 01, 20181. My .docx
Earlean, please write these notes for me. October 01, 20181. My .docxEarlean, please write these notes for me. October 01, 20181. My .docx
Earlean, please write these notes for me. October 01, 20181. My .docx
joellemurphey
 

More from joellemurphey (20)

Eastern European countries appear to have become dependent on Ru.docx
Eastern European countries appear to have become dependent on Ru.docxEastern European countries appear to have become dependent on Ru.docx
Eastern European countries appear to have become dependent on Ru.docx
 
EAS 209 Second Response Paper Topic Assignment Due .docx
EAS 209 Second Response Paper Topic Assignment Due .docxEAS 209 Second Response Paper Topic Assignment Due .docx
EAS 209 Second Response Paper Topic Assignment Due .docx
 
Earth Science LabIn what order do materials settle in waterSo t.docx
Earth Science LabIn what order do materials settle in waterSo t.docxEarth Science LabIn what order do materials settle in waterSo t.docx
Earth Science LabIn what order do materials settle in waterSo t.docx
 
EarlyIntervention Strategies Paper (15 points)The pu.docx
EarlyIntervention Strategies Paper (15 points)The pu.docxEarlyIntervention Strategies Paper (15 points)The pu.docx
EarlyIntervention Strategies Paper (15 points)The pu.docx
 
Early Hominids & Australopithecus SubscribeWhat is a too.docx
Early Hominids & Australopithecus SubscribeWhat is a too.docxEarly Hominids & Australopithecus SubscribeWhat is a too.docx
Early Hominids & Australopithecus SubscribeWhat is a too.docx
 
Early scholarly and philosophical manuscripts were in Greek. However.docx
Early scholarly and philosophical manuscripts were in Greek. However.docxEarly scholarly and philosophical manuscripts were in Greek. However.docx
Early scholarly and philosophical manuscripts were in Greek. However.docx
 
Early Learning & Developmental Guidelines July 2017 1 .docx
Early Learning & Developmental Guidelines July 2017 1 .docxEarly Learning & Developmental Guidelines July 2017 1 .docx
Early Learning & Developmental Guidelines July 2017 1 .docx
 
Early Innovations and Their Impact Today Wilbur and Orville Wrig.docx
Early Innovations and Their Impact Today Wilbur and Orville Wrig.docxEarly Innovations and Their Impact Today Wilbur and Orville Wrig.docx
Early Innovations and Their Impact Today Wilbur and Orville Wrig.docx
 
Early childhood professionals have an essential role in creating.docx
Early childhood professionals have an essential role in creating.docxEarly childhood professionals have an essential role in creating.docx
Early childhood professionals have an essential role in creating.docx
 
Early Constitutional ControversiesIn 1788, Alexander Hamilton and .docx
Early Constitutional ControversiesIn 1788, Alexander Hamilton and .docxEarly Constitutional ControversiesIn 1788, Alexander Hamilton and .docx
Early Constitutional ControversiesIn 1788, Alexander Hamilton and .docx
 
Early Civilizations MatrixUsing your readings and outside sour.docx
Early Civilizations MatrixUsing your readings and outside sour.docxEarly Civilizations MatrixUsing your readings and outside sour.docx
Early Civilizations MatrixUsing your readings and outside sour.docx
 
Early childhood teachers need to stay connected to what is occurring.docx
Early childhood teachers need to stay connected to what is occurring.docxEarly childhood teachers need to stay connected to what is occurring.docx
Early childhood teachers need to stay connected to what is occurring.docx
 
Early and Middle Adulthood PaperPrepare a 1,050- to 1,400-word.docx
Early and Middle Adulthood PaperPrepare a 1,050- to 1,400-word.docxEarly and Middle Adulthood PaperPrepare a 1,050- to 1,400-word.docx
Early and Middle Adulthood PaperPrepare a 1,050- to 1,400-word.docx
 
Earlier this semester, you participated in a class discussion about .docx
Earlier this semester, you participated in a class discussion about .docxEarlier this semester, you participated in a class discussion about .docx
Earlier this semester, you participated in a class discussion about .docx
 
EAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docx
EAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docxEAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docx
EAP1640 - Level 6 Writing (Virtual College, MDC) Author P.docx
 
Earlean, please write these notes for me. October 01, 20181. My .docx
Earlean, please write these notes for me. October 01, 20181. My .docxEarlean, please write these notes for me. October 01, 20181. My .docx
Earlean, please write these notes for me. October 01, 20181. My .docx
 
eam Assignment 4 Teaming Across Distance and Culture..docx
eam Assignment 4 Teaming Across Distance and Culture..docxeam Assignment 4 Teaming Across Distance and Culture..docx
eam Assignment 4 Teaming Across Distance and Culture..docx
 
ead the following articleMother Tongue Maintenance Among North .docx
ead the following articleMother Tongue Maintenance Among North .docxead the following articleMother Tongue Maintenance Among North .docx
ead the following articleMother Tongue Maintenance Among North .docx
 
eActivityGo to the United States Equal Employment Oppo.docx
eActivityGo to the United States Equal Employment Oppo.docxeActivityGo to the United States Equal Employment Oppo.docx
eActivityGo to the United States Equal Employment Oppo.docx
 
Each year on or around June 15, communities and municipalities aroun.docx
Each year on or around June 15, communities and municipalities aroun.docxEach year on or around June 15, communities and municipalities aroun.docx
Each year on or around June 15, communities and municipalities aroun.docx
 

Recently uploaded

Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
Elizabeth Walsh
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 

Recently uploaded (20)

How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 

Running head UNIT V CASE STUDY1UNIT V CASE STUDY2.docx

  • 1. Running head: UNIT V CASE STUDY 1 UNIT V CASE STUDY 2 Case One: ElectriGov Donnie Lewis Team Building Waldorf College The Abilene Paradox 1. Why is it important for an organization to have a mission? 2. Why is it important for team members to know their roles on a team? 3. Is competition within a team a good or bad thing? Explain your response. 4. Why is it important to set short- and long-term goals when planning a meeting regarding conflicts? Provide examples. 5. Why is it significant for leaders to understand how to resolve conflict and avoid unhealthy agreements?
  • 2. Case One: ElectriGov ElectriGov is a government agency whose mission is to supply electric power to various locations within the United States. The organization has three “line crews” whose job it is to install high-voltage power lines. The work is hard, dirty, and dangerous. Almost all of the men have had a friend who has been seriously injured or killed while on the job. The crews typically work independently, but when there are large projects to complete, the crews must work together. This can create serious conflicts, since the crews often don’t agree with each other’s approaches to organizing and managing a particular job, and none of the three foremen want to be subservient to the others. Thus when doing large projects together, the line crews tend to compete with one another, rather than cooperate. On one project, the conflict became so nasty that one crew failed to inform another crew that the wires were “hot” at a certain section of the project. This serious safety breach was reported to senior management, who immediately launched an investigation. We, as consultants, initially were asked to serve as part of the team investigating the causes of the safety violations. After the initial investigation, we were asked by ElectriGov’s senior management to “clean up the conflicts” between the crews. The approach we used to help the crews reduce their conflicts was a variation on design A. All three crews were brought together in one room, and the need for an interteam- development program was discussed. Each crew was asked to commit to solving the conflicts between themselves and the other crews and to agree to give the program a chance. Once this agreement was achieved, each crew was then asked to meet
  • 3. separately to list their perceptions of the other crews and the specific problems that they had in working with the other crews. After meeting separately, the teams were brought back together and each crew reported its perceptions of the other crews. In our consulting role, we facilitated the discussion, making sure that each crew’s perceptions were made clear and that each crew described the problematic behaviors of the other crews in concrete, specific terms. As a ground rule, crews were asked to be descriptive and to avoid using emotionally laden language when critiquing the other crews. After each crew presented its perceptions of the other crews, the other crews could ask questions to clarify points that were made, but the crews were not allowed to debate the validity of the other crews’ perceptions. After each crew aired their views, the crews were then asked to come up with recommendations to improve the relationship between crews. Their suggestions were listed on large poster boards in the room. The crews discussed how they might do more advanced planning on the larger projects to determine who would do what and who would be in charge of the project. They also considered rotating crew members to improve relationships between rews. At the end of this interteam-building session, each crew made a public commitment to change its behavior and implement the recommendations that were made. As a result of this intervention, the hostility between the crews decreased and the crews now have a new approach to working with each other on large projects that minimizes the conflicts that they had in the past.
  • 4. Reference McShane, S. L., & Von Glinow, M. A. (2013). Organizational behavior (6th Ed.). New York, NY: McGraw-Hill/Irwin. EECE 237 S15 - Lab 4. (XC).pdf EECE 237 Spring 2015 Homework Assignment #4 – Display scrolling, button press detection (Extra Credit) Assignment: Starting with the template file (on the BbLearn page), create a program that uses the supplied LCD_scroll() function to scroll a text message on the LCD display both left and right. A single button press should cause the display to scroll one position. A double press (two button presses with 1 second) should cause the direction of the scrolling to change. The first press will move the display one position to the right, and every single press after that will continue to move it to the right. When a double press occurs, the direction of the text shift changes, so every single press after that will shift
  • 5. the text that direction. The LED circle should also move a single lit LED clockwise each time the display is shifted right, and counter-clockwise each time the display is shifted left. • Use the LCD_scroll() function to shift the display left or right (do not rewrite it each time) • The display should be shifting right at the start of execution • Use the constants defined for the RIGHT and LEFT direction settings (to call LCD_scroll() ) • Use the defined PRESS_TIME constant to define the maximum number of ticks between the two button presses for a double press (do not change the value) • Do not worry about the display scrolling off the screen (if you keep scrolling in the same direction for about 10 steps, it will wrap back onto the screen) • The time measurement should be based on SysTickInterrupts. • All delays should be based on this Timer (No count delay loops) • The button press must be interrupt based (not polled) Deliverables: 1) Source code for solution program: C source file - submitted via BbLearn page. (Do not submit other project files). The file MUST be named as follows: <first initial>_<last name>_hw4.c for example, mine would be d_word_hw4.c
  • 6. The source code file must contain your name and student ID in the header block at the top of the page, and should be commented enough to be easy to read Due Date: Friday, May 15th – Assignment must be submitted to BbLearn by 8pm. __MACOSX/._EECE 237 S15 - Lab 4. (XC).pdf EECE 237 S15 Lab4 Template.c // // EECE 237 S15 // Lab 4 (XC) template // //includes for the project #include "stm32F30x.h" #include "STM32f3_discovery.h" #include "stm32f30x_gpio.h"
  • 7. #include "stm32f30x_i2c.h" #include "stm32f3_discovery_lsm303dlhc.h" #include "stm32f3_discovery_l3gd20.h" #include "main.h" #include "stdio.h" #include "string.h" // Constants ----------------------------------- #define SYSTICK_MASK 0xF000 #define TIM3_MASK 0x0F00 #define RIGHT 0 #define LEFT 1 RCC_ClocksTypeDef RCC_Clocks; GPIO_InitTypeDef GPIO_InitStructure;
  • 8. void IO_Init(void); void I2C_init(void); void I2C2_init(void); void Timer3_Init(void); unsigned int TIM3_tick_count = 0; unsigned int tick_count = 0; volatile int ButtonPressed = 0; void LCD_write(int,int, char); void LCD_clear(void); void LCD_contrast(int); // Contrast level = 1..50 void LCD_backlight(int); // Backlight level = 1..8 void LCD_scroll (int); // Scroll 1 space RIGHT or LEFT void Delay(uint32_t nTime);
  • 9. static __IO uint32_t TimingDelay; char message[16]; char ready_msg[] = " Ready...."; int main(void) { int i; IO_Init(); Timer3_Init(); I2C2_init(); while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) != RESET);
  • 10. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ LCD_contrast(40); LCD_backlight(6); LCD_clear(); for (i=0; i < 10; i++) LCD_write(0, i, ready_msg[i]); // Write "Ready..." tick_count = 0; while (!ButtonPressed); ButtonPressed = 0; GPIOE->ODR = 0;
  • 11. while(1){ sprintf(message, "Ticks = %5i", tick_count); for (i=0; i < strlen(message); i++) LCD_write(0, i, message[i]); // Display number on 1st line of display tick_count = 0; while (!ButtonPressed); ButtonPressed = 0; //GPIOE->ODR = (((++j%8)< 7) ? (0x0200 << (j%8)) : (0x0200 >> (8 - (j%8)))); LCD_clear(); }
  • 12. } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ void IO_Init() { EXTI_InitTypeDef EXTI_InitStructure; GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; /* SysTick end of count event each 1ms */ RCC_GetClocksFreq(&RCC_Clocks); SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000); /* GPIOE Periph clock enable */
  • 13. RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOE, ENABLE); /* Configure PE14 and PE15 in output pushpull mode */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15 | GPIO_Pin_14 | GPIO_Pin_13 | GPIO_Pin_12 | GPIO_Pin_11| GPIO_Pin_10| GPIO_Pin_9| GPIO_Pin_8; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; //GPIO_PuPd_NOPULL GPIO_Init(GPIOE, &GPIO_InitStructure); /* GPIOA Periph clock enable */ RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE); /* Configure PA0 in input mode */
  • 14. GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOA, &GPIO_InitStructure); /* Configure PA8 in output mode */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_PinAFConfig(GPIOA, GPIO_PinSource8, GPIO_AF_7); // TIM1_CH1 -> Pin A8
  • 15. /* Enable GPIOA clock */ RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE); /* Configure PA0 pin as input floating */ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; GPIO_Init(GPIOA, &GPIO_InitStructure); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); /* Connect EXTI0 Line to PA0 pin */ SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA, EXTI_PinSource0);
  • 16. /* Configure EXTI0 line */ EXTI_InitStructure.EXTI_Line = EXTI_Line0; EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; EXTI_InitStructure.EXTI_LineCmd = ENABLE; EXTI_Init(&EXTI_InitStructure); /* Enable and set EXTI0 Interrupt to the lowest priority */ NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); }
  • 17. void I2C2_init(void) { GPIO_InitTypeDef GPIO_InitStructure; I2C_InitTypeDef I2C_InitStructure; RCC_I2CCLKConfig(RCC_I2C2CLK_SYSCLK); RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2, ENABLE); RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE); GPIO_PinAFConfig(GPIOA, GPIO_PinSource9, GPIO_AF_4); GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_4); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
  • 18. GPIO_InitStructure.GPIO_OType = GPIO_OType_OD; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; GPIO_Init(GPIOA, &GPIO_InitStructure); I2C_DeInit(I2C2); I2C_InitStructure.I2C_Mode = I2C_Mode_I2C; I2C_InitStructure.I2C_AnalogFilter = I2C_AnalogFilter_Enable; I2C_InitStructure.I2C_DigitalFilter = 0x00; I2C_InitStructure.I2C_Ack = I2C_Ack_Enable;
  • 19. I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit; I2C_InitStructure.I2C_Timing = 0xC062121F; I2C_Init(I2C2, &I2C_InitStructure); I2C_Cmd(I2C2, ENABLE); } // // Scroll LCD Display - Direction should be LEFT or RIGHT // void LCD_scroll(int direction) { I2C_TransferHandling(I2C2, 0x50 , 3,
  • 20. I2C_SoftEnd_Mode, I2C_Generate_Start_Write); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0xFE); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); if (direction == LEFT) I2C_SendData(I2C2, 0x55); else I2C_SendData(I2C2, 0x56); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); Delay(20); }
  • 21. void LCD_write(int row, int col, char data) { // Move to sepcified row, col //while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) != RESET); I2C_TransferHandling(I2C2, 0x50 , 3, I2C_SoftEnd_Mode, I2C_Generate_Start_Write); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0xFE);
  • 22. while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0x45); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); if (!row) // if row == 0 I2C_SendData(I2C2, col); else // else row asumed to be 1 I2C_SendData(I2C2, (0x40 + col)); I2C_TransferHandling(I2C2, 0x50 , 1, I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
  • 23. while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, data); } // // Set LCD Contrast - Level should be 1..50 (Seems to work best if > 35) // void LCD_contrast(int level) { //while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) != RESET); I2C_TransferHandling(I2C2, 0x50 , 3, I2C_SoftEnd_Mode, I2C_Generate_Start_Write);
  • 24. while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0xFE); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0x52); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, level); Delay(20); } //
  • 25. // Set LCD Backlight - Level should be 1..8 (Seems to work best if > 1) // void LCD_backlight(int level) { //while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) != RESET); I2C_TransferHandling(I2C2, 0x50 , 3, I2C_SoftEnd_Mode, I2C_Generate_Start_Write); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0xFE); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0x53);
  • 26. while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, level); Delay(20); } void LCD_clear() { //while(I2C_GetFlagStatus(I2C2, I2C_ISR_BUSY) != RESET); I2C_TransferHandling(I2C2, 0x50 , 2, I2C_SoftEnd_Mode, I2C_Generate_Start_Write); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET);
  • 27. I2C_SendData(I2C2, 0xFE); while(I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) == RESET); I2C_SendData(I2C2, 0x51); Delay(20); } void Timer3_Init(void) { NVIC_InitTypeDef NVIC_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
  • 28. /* TIM3 clock enable */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE); TIM_TimeBaseStructure.TIM_Period = 50000; TIM_TimeBaseStructure.TIM_Prescaler = (SystemCoreClock/1000000)-1; TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM7, &TIM_TimeBaseStructure); /* Enable the TIM3 gloabal Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);
  • 29. TIM_ARRPreloadConfig(TIM3, ENABLE); /* TIM3 enable counter */ TIM_Cmd(TIM3, ENABLE); TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE); } // // Timer 3 Interrupt Handler // void TIM3_IRQHandler(void) { TIM3_tick_count++; if (!(TIM3_tick_count % 200)) GPIOE->ODR ^= TIM3_MASK;
  • 30. TIM_ClearITPendingBit(TIM3, TIM_IT_Update); } /** * @brief Inserts a delay time. * @param nTime: specifies the delay time length, in milliseconds. * @retval None */ void Delay(uint32_t nTime) { TimingDelay = nTime; while(TimingDelay != 0); }
  • 31. /** * @brief Decrements the TimingDelay variable. * @param None * @retval None */ void TimingDelay_Decrement(void) { if (TimingDelay != 0x00) { TimingDelay--; } } void SysTick_Handler(void) { TimingDelay_Decrement();
  • 32. tick_count++; if (!(tick_count % 200)) GPIOE->ODR ^= SYSTICK_MASK; } void EXTI0_IRQHandler(void) { if (EXTI_GetITStatus(USER_BUTTON_EXTI_LINE) == SET) { ButtonPressed = 1; /* Clear the EXTI line 0 pending bit */ EXTI_ClearITPendingBit(USER_BUTTON_EXTI_LINE); }
  • 33. } __MACOSX/._EECE 237 S15 Lab4 Template.c