Telescope drive motors that don't...


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking The new Forum fool ???

    Quote Originally Posted by malc-c View Post
    did I miss something here.. ?
    Hi, Malc

    I Think yes ...

    To me, Our Friend Trent smokes too much illegals ...

    like in the 60's when writers ( Françoise Sagan i.e. ) were smoking mushrooms to try to get some inspiration ...

    but do not worry ... He doesn't bite ...

    Or , may be , he tried himself a new electronic version of his Electric Chair ( see previous posts )...

    Hope he won't try a new "Trentorized" version of the machine used in the film " FLY" ( w . Jeff Goldblum )

    ...

    Alain
    Last edited by Acetronics2; - 8th April 2008 at 09:35.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    but do not worry ... He doesn't bite ...
    And that's exactly why I'd never make it as a copper. My nerves are absolutely shocking and I haven't got the stomach for it. My heart goes out to anyone in law enforcement that goes around chasing these guys, I know it would be absolute hell

  3. #3
    Join Date
    Mar 2008
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    "...OK - did I miss something here.. How the hell did this topic get from discussing telescope drives to discussing the merrits of death row ???

    I gather the original poster gave up in the end and purchased a commercial driver. Maybe because the topic went way off topic, maybe as purchasing a ready made alternative to developing his own was the easy option...."


    No, I'm actually just waiting here for the off-topic discussion to die down. I went and purchased a commercial microstepping chip to use instead of the L293D, but I still expect to drive it using a PIC. In fact, I have some more problems now, because I thought PIC assembler was fairly simple, and it turns out not to be!

    I am confused by the memory allocation of variables. As far as I can see, a PIC .ASM file comprises a set of memory declarations followed by some commands. Variables are defined by naming them and giving their locations, thus:

    VAR1 EQU H'10' ;defines the location H10 as VAR1
    VAR2 EQU H'22' ;defines the location H22 as VAR2

    and then you can load them:

    MOVLW D'5'
    MOVWF VAR1 ;puts 5 in VAR1 (location H10)
    .
    .
    MOVLW VAR1 ;puts 5 back in the W Register

    and generally play with them. But when I try to alter the program I have, it complains that some of the variables I create are in 'Restricted Memory'. I can't find any way to work out what is legal memory and what isn't. I have tried putting variable in random places until the error goes away, and then I hit the next problem, which seems to be that other processes also write to the memory locations I am using, so every so often my counts jump up by 20 or so. There are several simple tutorials on the web for blinking LEDs, but none seem to cover this sort of problem...

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Welcome back

    Which chip you're using right now? For each PIC, there's some dedicated places for the GPR. Look your datasheet under Data Memory Map, and see where you can sit your General Purpose Registers.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    >>MOVLW VAR1 ;puts 5 back in the W Register

    I am not sure if it is important to you, but this line puts 16 into W (not 5).

    MOVF VAR1, W

    would put 5 back into W
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  6. #6
    Join Date
    Mar 2008
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Hi, All,

    I'm still using the PIC16F627. Thanks to Mister-E for pointing me at the data sheet (all 170 pages!!). I see that the data memory map is in 4 banks (I thought it was 2), and that there is a difference between 'unimplemented data locations' and 'general purpose registers' (which I don't understand). I had been putting my counts in the unimplemented slots, and they seemed to vary when I didn't touch them. Now I am putting them at H'20' onwards.

    Where does the actual program code go? There seems to be no indication of this.

    Paul has put his finger on one of my problems - I could not (and still can't) understand why MOVLW VAR1 does not put the contents of location VAR1 into the W register. And in my example, where VAR1 is D'5', where does the 16 come from? Is it D'16', or H'16'? But thanks, Paul - I used your recommendation and now my counts have improved considerably...even though I still don't know why!

    I will stick with trying to make this motor work - buying a different microstep driver chip has required a different veroboard circuit, so I have been learning circuit design - VERODES is a really easy program to use for this purpose. Once I have cracked the code issues we will have another go at making this scope turn!

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Small and short explanation here...

    There's a slight difference between Literal and Registers

    MOVLW Move the literal in W.
    Literal is a constant, when you're using a variable in there.. it return the constant associated to your variable... it's address
    MOVLW .10 will copy 10 (decimal) in W
    <hr>
    MOVF Move register to x destination (F or W)
    Rough explanation... Registers are variable... mean that you can change register value, not their address

    MOVF YourVar,W will copy the value of YourVar to W
    MOVF PORTB,W read PORTB, and store it to W
    <hr>
    where does the 16 come from? Is it D'16', or H'16'?
    from this line
    VAR1 EQU H'10'

    10hex = 16 Decimal
    <hr>
    Where does the actual program code go? There seems to be no indication of this.
    go one page before in your datasheet Memory Organization . Your actual code begin a RESET_VECTOR 0x000. You have different block, Program Memory, Data Memory and EEPROM data. Data memory are your PIC register and your GPRs
    <hr>
    Unimplemented.. you just can't use them.. not much
    <hr>
    170 pages... well that's one of those small. I have some which have over 700, and some can't be download in one shot... DsPIC are good example... you must download the whole reference family set + the one for your DsPIC... kinda load of reading before getting comfortable with.

    Oh well, don't be afraid, those datasheet looks way bigger when you begin.
    Last edited by mister_e; - 11th April 2008 at 10:55.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. MPASM Path & File Name Length Limtation
    By Brian J Walsh in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th June 2008, 15:48
  2. Differential Drive Programming
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 30th December 2006, 14:03
  3. motors browning out PIC
    By mbw123 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 17th November 2006, 02:50
  4. CD ROM Motors.
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2006, 17:59
  5. problems with Servo Motors...
    By saturnX in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2006, 01:43

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts