1.Write function in C that gets array of chars, and search for the longest sequence of repeatedly 1 bits. It returns the the first bit place in the sequence and the number of 1 bits in the sequence. - (a) loop of 2^0, 2^1, … , 2^7 is done with 1<<j when 0<=j<=7. (b) Take care of remembering the first place of the bit sequence you are counting.

2.You have 16bit register that increment itself and loops about every second. When the register reach 0xffff it will issue an interupt and will run the function update_time(). There is a function unsigned long get_time() that returns the time. You need to implement the two functions. - (a) You need to count every interrupt in order to save the number of seconds. (b) The counter will be the 16bit MSB, and the actual register will be 16bit LSB. (c) If the register will be at ~0xfff0, you will return MSB that is not correct, because you will read the counter, then interrupt will accure and increment by one. Now you have counter that is not correct. (d) You need to check for the (c) problem, and if you catch the problem, you need to read once again the register and the counter before you return them. You depend on the fact the you have about another second until the register will loop.


 


对嵌入式初学者有必要解释一下什么是firmware,中文为固件,一般跑在DSP上,是比较底层的东西,也是目前比较热门和有挑战性的嵌入式工种。从下面的一则招聘信息中我们也可以知道Firmware大概干些什么。


 


招聘职位: Firmware engineer/Senior Firmware engineer
职位描述: Firmware Engineer
Responsibility:
Developing or adapting hardware device driver
Developing or adapting embedded application software for Video Codec
Implementing software on system-on-chip solution using a combination of C
and assembly programming languages. Tuning software for performance
Requirements:
.Solid skills developing in C and assembly languages ,
Experience developing and debugging embedded systems
(ARC, ARM, MIPS, SPARC, ...)
.familiar with peripherals and protocols, such as I2C,
UART,USB,LCD,Ethernet,IDE,SD,TCP/IP,RTP…,Knowledge
of Video CODEC standard and principle,
eg:  MPEG-1/2/4, H.264 is preferred
.good at English, team player, positive personality,
and able to work under pressure to meet deadlines.
BS in Electrical Engineering, Computer Science,
Ability to learn and apply new knowledge quickly
 
职位要求: Senior Firmware
Engineer Responsibility:
Development of embedded software systems for video processing,
involve in all phases of the embedded software development cycle including research, design, implementation, system debug, and documentation.Top-level system firmware integration;
System performance trimming and improvement;
Requirements:
Experience developing and debugging embedded systems
(ARC, ARM, MIPS, SPARC, ...),especially in a RTOS
environment(ThreadX,uclinux,MQX)
.familiar with peripherals and protocols,
such as I2C,UART,USB,LCD,Ethernet,IDE,SD,TCP/IP,RTP…
.Good knowledge of Video CODEC standard and principle,
(eg:  MPEG-1/2/4, H.264), hands-on
.experience on video encode/decode as well
as video applications(HDTV, streaming media,
HD-DVD, PVR/VOD, networked camera, digital
camcorder/camera, video conferencing,
and/or record-able media) is desirable.
.Good at English, team player, positive personality,
and able to work under pressure to meet deadlines.