Gallery, Projects and General > Project Logs
X2 X-axis Stepper motor Power Feed - (possible CNC conversion?)
<< < (8/19) > >>
spuddevans:
That's looking good Chris  :wave:


--- Quote from: craynerd on December 30, 2009, 06:32:16 PM ---I just need to encase it now. Has anyone any suggestions? I was thinking an aluminium case but I don`t know how you could lock it together
--- End quote ---

You could hollow out a cube of Ali with holes drilled for the led's, then use some of those really strong magnets to hold the base onto the hollowed out section. The whole thing would look like a large dice ( die? ) but would have no visable fixings.

Just a thought.


Tim
raynerd:
No1-sonuk - lol, tell me about it!! It took me ages to figure out what to do to get them off. I found I had to type:

// All ports digital
ADCON1 = 0x0F;
CMCON = 0x07;

and that works perfectly but if I`m being honest, I haven`t a clue what it means. I didn`t even find it on the data sheet, I googed it!!! This is for my PIC18F4520 which I`m using on a current project but on the PIC16F627 I was using on the dice project shown in this thread obviously didn`t need it, I presume it doesn`t have any ADC?

I wouldn be interested to see your projects if your willing to share them. What code do you program in?

SpudEvans - yea I thought of that, I think it would look best but at present my circuit design is too bulky and wouldn`t fit in a decent size block. I think maybe I`ll redo the circuit on strip board and try and slim it down a little.
John Rudd:
Chris,

The F627 doesnt have adc capability, it has 2 in built analog comparators with inputs on pins 1,2,17 18 and needs the cmcon function to turn off the comparators...

If you look at the Microchip data sheet pg 63, cmcon=111(Binary) turns off the comparator function, your function above says 7 ( I guess the Radix used is Decimal or Hex)
raynerd:
Hi John,

That explain a lot - thank you!!!

I didn`t know that but it is clearer now when reading the datasheet after you have said, that would explain why the dice would not work correctly when I put the button on PortA.b0 or b1   - they are ports 17 and 18 and as you said, I need to turn the analog comparators off. If I being honest, I don`t even know what the analogue comparators do - I`ll have to have a google.

Thanks for the info. Regarding the code I posted in my last message - ADCON1 = 0x0F; CMCON = 0x07; I had to write that to get the 18f4520 to work. I`m sorry, I`m looking at the data sheet but I can`t see where I get that from (I googled it and someone mentioned it to another noob on a forum)? I know it is going to turn the pins to digital but can`t see where the code if from. Any advice appreciated.
Just curious John, what sort of stuff have you done with PICs?
Chris
No1_sonuk:
"0x07" is the convention used for hexadecimal numbers.

Most of my stuff has been in assembler, but I've recently dipped my toe into C.
Navigation
Message Index
Next page
Previous page

Go to full version