포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 20MB 입니다.

펌웨어 하실 때 2진수 변환 할 때 짜증나실 경우 걍 이거 쓰시면 됩니다. :)

oct2bin(unsigned int n)
{
  if (n) oct2bin (n>>1);
  data[oct_i]=(1&n);
  oct_i++;
}

#include < stdio.h>

void dec2bin(int n)
{
    if (n>1)
        dec2bin(n/2);
    printf("%d",n%2);
}

void dec2octal(int n)
{
    if (n>1)
        dec2octal(n/8);
    printf("%d",n%8);
}

profile

인생은 연극이고 세상은 무대이다!

이솝 임베디드 포럼 운영 및 비즈니스와 관련된 것 이외에 E-Mail이나 메신저 및 휴대폰 등을 통한 개인적인 질문 및 답변은 받지 않습니다. 문의 사항은 이솝 임베디드 포럼 게시판을 이용해 주시면 감사하겠습니다.

엮인글 :
http://www.aesop.or.kr/index.php?mid=Board_Documents_Linux_Applications&document_srl=35446&act=trackback&key=7f1
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
33 dos2unix source & site file 고현철 2009-01-30 6113
32 grep을 이용한 검색 script ==> gref 고현철 2009-01-30 6111
31 framebuffer capture하기 [1] 고현철 2009-03-30 6107
30 Linux 101 Hacks file [1] 유형목 2009-02-15 6107
29 펌웨어 프로그래밍 팁 - gotoxy() 김재훈 2009-01-31 6105
28 wxWidget mysql direct access file 고도리 2008-07-18 6095
27 The GNU Binary Utilities - How to Using binutils file 김재훈 2009-04-03 6084
26 micro second to jiffies 변환 고현철 2009-01-30 6083
25 C Library ABI for the ARM®Architecture file 김재훈 2009-03-31 6077
24 POSIX Serial Programming Guide file 김재훈 2009-02-12 6075
23 CVS 디렉터리 날리는 방법 김재훈 2009-02-12 6065
22 The GNU Make - How to Using Make file 김재훈 2009-04-03 6064
21 간단한 리눅스 firewall script 고현철 2009-01-30 6062
20 한글 mount/samba option 고현철 2009-01-30 6059
19 유용한 ARM 어셈블리 매크로 김재훈 2009-01-31 6056
18 SDL에서 touchscreen enable 시키는 방법 고현철 2009-03-04 6046
17 일본어 mount option 고현철 2009-01-30 6046
16 The GNU Linker - How to Using ld file 김재훈 2009-04-03 6044
15 ARM ADS Errors and Warning 코드 설명 file 김재훈 2009-02-12 6040
» 펌웨어 프로그래밍 팁 - 2진수 처리기 김재훈 2009-01-31 6037

사용자 로그인