Tocalili Posted March 31, 2012 Report Share Posted March 31, 2012 Boas, Preciso de comunicar com um potenciómetro digital com uma pic da série 18f através de SPI. Precisava de umas rotinas em C, utilizo o compilador da high tech picc18 versão 9.66. Link to comment Share on other sites More sharing options...
pmg Posted March 31, 2012 Report Share Posted March 31, 2012 ... Precisava de umas rotinas em C ... Ok, eu começo ... void rotina_numero_1(void) { /* void */ } What have you tried? Não respondo a dúvidas por PM A minha bola de cristal está para compor; deve ficar pronta para a semana. Torna os teus tópicos mais atractivos e legíveis usando a tag CODE para colorir o código! Link to comment Share on other sites More sharing options...
bubulindo Posted March 31, 2012 Report Share Posted March 31, 2012 Ok, eu começo ... void rotina_numero_1(void) { /* void */ } Eu adiciono algo mais: void send_byte(unsigned char toSend) { //... } unsigned char receive_byte() { //... } include <ai se te avio> Mãe () { } Link to comment Share on other sites More sharing options...
bsccara Posted March 31, 2012 Report Share Posted March 31, 2012 Vê lá se te serve: http://www.ccsinfo.com/forum/viewtopic.php?t=26801&highlight=mcp23s17%3Cbr%20/%3E P.S. Um conselho amigo... pesquisa no Google primeiro, tenta adaptar, se não funcionar pede ajuda aqui. Não peças que te façam tudo... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now