CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

adc on 10f222
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pdl



Joined: 01 Jun 2005
Posts: 45
Location: UK

View user's profile Send private message

PostPosted: Fri Aug 07, 2009 3:44 pm     Reply with quote

Hi PCM programmer it the code snip that you posted

If I could get this working I could do the rest.

Thanks

Pete
Code:

#include <10f222.h>
#device adc=8
#FUSES NOWDT, NOMCLR, NOPROTECT, NOMCPU, IOSC4
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_B2)

//=========================
void main()
{
int8 result;

setup_adc_ports(sAN1);  // A/D input on pin GP1
setup_adc(TRUE);
set_adc_channel(1); 
delay_us(20);

while(1)
  {
   result = read_adc();
   printf("%U ", result);
   delay_ms(500);
  }

}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 07, 2009 3:48 pm     Reply with quote

What is the output that is displayed ?
pdl



Joined: 01 Jun 2005
Posts: 45
Location: UK

View user's profile Send private message

PostPosted: Fri Aug 07, 2009 5:49 pm     Reply with quote

not a thing

Pete
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 07, 2009 5:57 pm     Reply with quote

Do you for certain that ISIS will work with this PIC ?

Do you know that ISIS will display asynchronous serial data, when the
PIC uses a software UART ? The 10F222 doesn't have a hardware UART.
I suggest that you test that first. See if you can make a "Hello World"
program that will run in ISIS. Get rid of all the A/D stuff. Just use a
printf and a while(1); at the end.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group