Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Calculate signed and unsigned

2011-09-02 by Антощенков Роман Викторович

Hello!

I using AtMega32A, AVRStudio 4.18SP3 and WinAVR 2011.

unsigned int param1;
  signed int param2; (
unsigned int param3;

OCR1B = (unsigned int)(param1 - param2);
OCR1A = (unsigned int)(param1 - param2 - param3);

I do not get the correct result. How to calculate signed and unsigned variables?

--
Best regards,
Roman Antoshchenkov

Kharkiv
Ukraine

+38-057-732-97-95
+38-066-605-95-47
ICQ: 461-481-952
mailto:djantoxa@rambler.ru

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.