RE: [DSPEngineering] How to handle 16 bit number in an 8 bit microcontroller?
- View SourceHi Omar,
You have to use 2 registers to store a 16-bit number.
And perform the operations for lower byte and upper byte correspondingly taking care of the overflow/carry from lower byte operation to upper byte.
Omar Hashmi <omarhashmi786@...> wrote:
>I am working with AVR 8 bit micro, which has 32
>registers, each 8 bits. There is no accumulator.
>But for my needs, I need a 16 bit variable (2 bytes).
>Which will have my Q format number.
>Any thought how can I handle a 2 byte number in an 8
>Do you Yahoo!?
>Yahoo! Small Business - Try our new resources site!
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp