![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #31 |
|
This is the sample code from the data sheet Code: CALL SampleTime ;Acquisiton delay
BSF ADCON0,GO ;Start conversion
BTFSC ADCON0,GO ;Is conversion done?
GOTO $-1 ;No, test again
BANKSEL ADRESH ;
MOVF ADRESH,W ;Read upper 2 bits
MOVWF RESULTHI ;store in GPR space
BANKSEL ADRESL ;
MOVF ADRESL,W ;Read lower 8 bits
MOVWF RESULTLO ;Store in GPR space
Code: CALL SampleTime ;Acquisiton delay Code: SampleTime:
nop ;1 cycle
return ;4 cycles
| |
| |
| | #32 |
|
Your code is fine Burt, I shouldn't pay any attention to him - you only need to check if the ADC is busy after initiating a read - unless you've initiated a read, it can't possibly be busy.
| |
| |
| | #33 |
|
This is from microchip sample code Code: MainLoop:
nop ; wait 5uS for A2D amp to settle and capacitor to charge.
nop ; wait 1uS
nop ; wait 1uS
nop ; wait 1uS
nop ; wait 1uS
bsf ADCON0,GO ; start conversion
btfss ADCON0,GO ; this bit will change to zero when the conversion is complete
A call =2 nop =1 return = 1 that's five for A2D amp to settle and capacitor to charge | |
| |
| | #34 |
|
Abusive post deleted - moderator. 24 hour ban for abusive behaviour. Last edited by Nigel Goodwin; 1st July 2009 at 08:27 PM. | |
| |
| | #35 |
|
Bad language post deleted - ElectroMaster. Next time will be a official warning. Last edited by ElectroMaster; 4th July 2009 at 11:55 PM. | |
| |
| | #36 |
| Perhaps you should also ask, "Where do I find this mysterious PIC? It doesn't appear on the MicroChip site at all."
__________________ Inside every little problem, is a big problem trying to get out. | |
| |
| | #37 |
|
Mrdeb here the schematic for the test board I made
Last edited by be80be; 3rd July 2009 at 04:24 AM. | |
| |
| | #38 |
|
in the middle of the schematic??
| |
| |
| | #39 |
|
Sorry about that I didn't remove it all it was a 74hc164 but it's not on that board it was on the schematic I thought i remove it all my kids was trying to get me to take them skating and i didn't look it over good I fixed it should make since now.
| |
| |
| | #40 |
|
here all the files mrdeb
| |
| |
| | #41 |
|
Hey Burt i did something like that for the junebug a while back its in the second JPUG. (Junebug Newsletter (Junebug User Guide) Good Job!! Check out: #2 June 2008 JPUG the Junebug PIC Users Group Newsletter Even did a nice PCB layout when you scroll down...
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 3rd July 2009 at 08:46 PM. | |
| |
| | #42 |
|
if I had the sch file then I can finish. this is the express pcb file for board how can I post a file?? not really done but its a start. need sch file or I have to redraw it | |
| |
| | #43 |
|
Here that is
| |
| |
|
| Tags |
| adc, ideals |
| Thread Tools | |
| Display Modes | |
| |