Hi Martin, Change this... unsigned char var = 1000; ...to this... unsigned char var = MakeUnsignedChar(1000); And add the function: #include <stdio.h> #include <stdlib.h> unsigned char MakeUnsignedCharFromInt(int x) { if(x > 255 || x < 0) { fprintf(stderr, "Parameter %d out of unsigned char bounds.", x); abort(); } return (unsigned char)x; } HTH, --Eljay