How do I give a radio control car autonomous control


Closed Thread
Results 1 to 40 of 191

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default More good luck for me!!

    Before we all conversed I purchased two books from amazon.com.

    Sandhu's 'Running Small Motors with PIC microcontrollers' has all its code in PIC BASIC PRO. 2000+ lines according to the cover.

    Parchizadeh and Vuksanovic's 'PIC Projects - A Practical Approach' has all its code in both assembly and C.

    Many (many!) years ago I coded in assembly language a water cooled, vacuum tube constructed architecture eerily similar to the 16F877. We developed shared symbol tables and a library of shared routines. Do these exist in the WEB based world of Microchip PIC?

    HI-TECH offers a freeware C - LITE compiler. The price is right, but this forum talks PIC BASIC. Decisions decisions...


    Ken

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Here is the place for ASM and C.
    http://www.piclist.com/techref/piclist/index.htm
    Start with the "Beginners Checklist" link.

    Your project would be fun to have around here but cost is cost.

    In ASM for Micros symols are not used.
    Here is an example to blink one LED with PBP
    Code:
        DEFINE OSC 20
        @ __config _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
    START:
        HIGH PORTD.1
        PAUSE 250
        LOW PORTD.1
        PAUSE 250
        GOTO START
    Here is an example to blink one LED in ASM.
    Code:
    ;	processor	16f876a
    	#include 	<p16f876a.inc>
    	ERRORLEVEL -224
    	; Configuration bits
    	__CONFIG _HS_OSC & _WDT_OFF & _PWRTE_ON & _BODEN_OFF & _LVP_OFF & _CPD_OFF & _WRT_OFF & _DEBUG_OFF & _CP_OFF
    	CBLOCK 0x20   ; RAM starts at address 20h
    	d1
    	d2
            ENDC
    	org 0x0000      ; start address = 0000h	
    	movlw		B'00000000'
    	tris		PORTA
    	movlw		B'00000000'
    	tris		PORTB
    	movlw		B'00000000'
    	tris		PORTC
    	movlw		B'00000111'
    	movwf		CMCON
    	movwf		ADCON1
    	clrf		PORTA
    	clrf		PORTB
    	clrf		PORTC
    	movlw		B'00000111'
    	option
    loop:
    	bsf			PORTC,3
    	call Delay
    	bcf			PORTC,3
    	call Delay
    	goto loop
    
    ; Delay = 0.1 seconds
    ; Clock frequency = 4 MHz
    ; Actual delay = 0.1 seconds = 100000 cycles
    ; Error = 0 %
    Delay	;99993 cycles
    	movlw	0x1E
    	movwf	d1
    	movlw	0x4F
    	movwf	d2
    Delay_0
    	decfsz	d1, f
    	goto	$+2
    	decfsz	d2, f
    	goto	Delay_0	;3 cycles
    	goto	$+1
    	nop		;4 cycles (including call)
    	return
    	end
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default OKAY - I'm blown away.

    I hate .pdf reference manuals. I will stay with the group and purchase PIC BASIC (according to the picture it comes with both a CD and a real 20th Century paper manual). PIC BASIC LITE does not appear in the Microchip SEARCH engine. Oh, well. What's another $250? (I just paid $374 for the left tail light of my car. It comes as one big assembly. All I did was break the red plastic lens!)

    I was intimidated by the 270 page and 290 page .pdf files which purported to tell me all I need to know to write in MPASM.

    I have coded in assembly, in Pascal, in C and C++ (even fortran way back when). Never in Basic. I hope you guys a patient.

    Ken

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Glad to see you are sticking around.
    I have coded in assembly, in Pascal, in C and C++ (even fortran way back when). Never in Basic. I hope you guys a patient.
    Melanie is the only one to worry about.
    I hear she has a whip
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default I got a demo C program to work

    The demo PIC Assembly programs are straight forward. I understood them. They work.

    I was happy to discover that the HI-TECH PICC lite integrates into MPLAB IDE easily. It offers a demo program that is much more complicated than the assembly shots. It worked here in sunny scenic Fitchburg Mass.

    The MPLAB IDE contains another free C compiler. We'll see what it offers.

    Ken

  6. #6
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Getting a bit frustrated.

    I ordered five DPDT relay switches early last week from Newark. They have not arrived yet. I have not prototyped a digital/analog circuit is over thirty years. We used wire wrap in the day. Yesterday I bought from Radio Shack solder, a low power iron, some small tools, and three different kinds of proto boards. It is not obvious how we physically attach capacitors, resistors, transistors, to these boards. I gather the inline chips get plugged into sockets that have pins which fit into these proto boards. Their back sides are designed for some kind of wire attachment. Wire wrap?

    Can you guys point me to some revealing photographs?

    Ken

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Can you give the Radio Shack part number or picture of what you have?
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Car radio (Car radio and electronics support forum)
    By freewillover in forum Forum Requests
    Replies: 1
    Last Post: - 1st July 2009, 19:41
  2. Remote Car Starter Safety
    By CocaColaKid in forum General
    Replies: 8
    Last Post: - 22nd November 2005, 09:10

Members who have read this thread : 1

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

Tags for this Thread

Posting Permissions

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