Practice more and More

int vel=0;

 

if(vel<=50)  PORTD=~0b11111111;

 

 

여기에서 warning: large interger implicitly truncated to unsigned type  오류가 발생.

 

 

2진수로되어 있는 부분 앞에 (unsigned char)로 해주면 됨.

 

if(vel<=50)  PORTD=(unsigned char)~0b11111111;

 

이런식으로 하면 warning 사라지는 것을 확인.

 

'AVR&ARM' 카테고리의 다른 글

STLINK 오류 cannot load flash device description  (0) 2017.04.14
[AVR] DC_motor 제어  (1) 2016.05.26
avr 처음 사용시 Fuse 설정  (0) 2016.05.13
이진수 MSB, LSB 역순으로 만들기 함수  (0) 2016.05.11
[AVR studio] warning "F_CPU~"  (0) 2016.04.20