View previous topic :: View next topic |
Author |
Message |
pdl
Joined: 01 Jun 2005 Posts: 45 Location: UK
|
|
Posted: Fri Aug 07, 2009 3:44 pm |
|
|
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
|
|
Posted: Fri Aug 07, 2009 3:48 pm |
|
|
What is the output that is displayed ? |
|
|
pdl
Joined: 01 Jun 2005 Posts: 45 Location: UK
|
|
Posted: Fri Aug 07, 2009 5:49 pm |
|
|
not a thing
Pete |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Aug 07, 2009 5:57 pm |
|
|
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. |
|
|
|