1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

wireless communication

Discussion in 'Microcontrollers' started by MrDEB, Feb 13, 2012.

  1. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Mrdeb the junebug can I said can program a 10f200
     
  2. sanoopgr8

    sanoopgr8 New Member

    Joined:
    Feb 14, 2012
    Messages:
    39
    Likes:
    0
    Location:
    chennai,india
  3. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    Must be doing something wrong

    I downloaded from site2, downloaded both items
    The second item is a binary file.
    When I open or at least try I get this error.
    Running win7
    ?????????????
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn

    Windows 7 will not use that dill it's for older XP Why do you even want it you have a pickit2 clone you don't need it

    winpic800 will run on 7 I use the dissembler

    MrDeb you can add them newer chips there a update for the pickit2 device file you can get it here http://www.microchip.com/forums/m487219-print.aspx

    it adds these
     
    Last edited: Feb 15, 2012
  6. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    Maybe I got confused?
    I assume that all I need to do is build the module boards from nigels site and follow the lesson plan to learn assembly language?
    The 10 and 12 series chips would be cheaper for my present projects.
     
  7. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    BOY this sure LOOKS similar to PIC BASIC

    I have two books one in front of me is PIC IN PRACTICE by D W Smith.
    Looking over the code examples it looks very similar to this
    Code (text):
    torial 1.3 - Nigel Goodwin 2002
        LIST    p=16F628        ;tell assembler what chip we are using
        include "P16F628.inc"       ;include the defaults for the chip
        __config 0x3D18         ;sets the configuration settings (oscillator type etc.)

        cblock  0x20            ;start of general purpose registers
            count1          ;used in delay routine
            counta          ;used in delay routine
            countb          ;used in delay routine
        endc
       
        org 0x0000          ;org sets the origin, 0x0000 for the 16F628,
                        ;this is where the program starts running  
        movlw   0x07
        movwf   CMCON           ;turn comparators off (make it like a 16F84)

        bsf     STATUS,     RP0 ;select bank 1
        movlw   b'00000000'     ;set PortB all outputs
        movwf   TRISB
        movwf   TRISA           ;set PortA all outputs
        bcf STATUS,     RP0 ;select bank 0
        clrf    PORTA
        clrf    PORTB           ;set all outputs low
    Am I correct in assuming this?
    Will order some 16F628 and ? or should I just use what I have for now (18F1320 and 18F4520?
     
  8. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,319
    Likes:
    653
    Location:
    Derbyshire, UK
    18 series are considerably more complicated (and more powerful), and 16F code requires some changes to run.
     
  9. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    I realize the 18series is more powerful and requires changes in code.
    Need to read suggestions on chips to get.
    Definatly the 10F200, 16F84 (in book) and 16F628
     
    Last edited: Feb 15, 2012
  10. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    Looking over the LEDboard as well as the main board 16F628, WHY a 1k resistor for LEDs?. Thats only 5ma to drive each of the LEDs?
    Misprint or ??
    My plan is to etch a board utilizing the 16F628 board with the LEDs board, switch board, LCD all on one board.
    need to check pinout of 10F200 if I can use on same (or add another socket?
     
  11. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    STUPID question?
    I looked at the 10F200, how to program with out an ICSP type header or is there an adapter to serial program this chip?
    Using a Junebug (pickit2 clone)
     
  12. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,319
    Likes:
    653
    Location:
    Derbyshire, UK
    Why do you want more than 5mA?.
     
  13. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    You hook it up like this to program View attachment 61142

    Here a little code that I learn from Nigel tutorials some of it I TX part It was for a 12f508 I changed it to a 10f200

    Code (text):

    ; Internal RC calibration value is placed at location 0x1FF by Microchip
    ; as a movlw k, where the k is a literal value.

        list      p=10F200            ; list directive to define processor
        #include <p10F200.inc>        ; processor specific variable definitions

        __CONFIG   _MCLRE_OFF & _CP_OFF & _WDT_OFF
    ; pin assignments
       
     #define  TX  GPIO,0  ; transmit pin on GP0



    ;***** VARIABLE DEFINITIONS
          UDATA
     buffer     res    1            
     counter    res    1
     Count      res    1


    RESET   CODE    0x000           ; effective reset vector
            movwf   OSCCAL          ; update OSCCAL with factory cal value
       
        goto    init              ; jump to main program
    init
     movlw b'00000000'   ; set I/O
        tris    GPIO
     bsf  TX
     movlw 'b'               ; sets text to loads buffer with
     call start
     movlw 'e'
     call start
     movlw '8'
     call start
     movlw '0'
     call start
     movlw 'b'
        call start
     movlw 'e'
        call start
     movlw ' '
     call start
     movlw 'w'
     call start
     movlw 'a'
     call start
     movlw 's'
     call start
     movlw ' '
     call start
     movlw 'h'
     call start
     movlw 'e'
     call start
     movlw 'r'
     call start
     movlw 'e'
     call start
     movlw 0x0A
     call start
     movlw 0x0D
     call start
        goto init   ;loop for ever
     
    start
     movwf buffer
     movlw 0x08
     movwf counter        ; counts the 8 bits
        bcf   TX             ; set TX low
        call  BItdelay       ; delay to get a 9600 bit rate
    TXLoop  
        rrf   buffer ,f      ;send one bit
        btfss STATUS ,C      ;  
        bcf   TX             ;
        btfsc STATUS ,C  ;
        bsf   TX  ;
        call  BItdelay  ;
        decfsz counter,f     ;test if all done
        goto  TXLoop  ;
        bsf   TX  ;
        call  BItdelay  ;
        return
    BItdelay                 ; timing delay

        movlw 0x17
        movwf  Count  
    Wait    
        nop
        decfsz Count ,f
        goto   Wait
        return

     END  ; directive 'end of program'
     
     
    Last edited: Feb 15, 2012
  14. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    Now my head is spinning
    When I get a 10F200 how do I connect the Junebug to it or do I need a serial interface or ?
     
  15. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Last edited: Feb 15, 2012
  16. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
  17. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,414
    Likes:
    23
    Thanks Burt
    I'm glad I don't need another interface board.
    The code you posted is for ? transmitting ?TX
     
  18. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,319
    Likes:
    653
    Location:
    Derbyshire, UK
    It's just an RS232 routine, it's not really suitable for wireless use - as wireless doesn't preserve the pulse widths.
     
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Nigel The code I posted is serial and I only posted it to show Mrdeb it not that hard to do.. I can change it to work from what I have been reading this is using 2000 bits per sec And it sends the Commands strait out than inverts the data.

    But the people at iteadstudio give links to software for the ardunuo and digging around there tells you that it's basically the same radios that sparkfun sold and they point you to sparkfun for data sheet for this thing. So i read the stuff over there and find you can just read the data serial at 2400baud and send it The same

    SO I'll order me some and try it out.
     
  20. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,319
    Likes:
    653
    Location:
    Derbyshire, UK
    As long as you invert the data (easy in software - or use external hardware inversion for the UART), keep the baud rate low, and aren't too concerned about data errors, then you can do a rough serial connection using RS232 type serial.

    There's a project on one of my websites (ten years ago) doing just that:

    http://www.lpilsley.co.uk/cybot/rx_picboard.htm

    But as it's only software, why not do it properly with Manchester coding? - my tutorials went that way following my experiences from back then.
     
  21. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Well I was going to do it the right way :D:D I just have to find out which way that is there is no data sheet for this thing. And they only give code for the arduino which shows how it works but that don't mean much. It's not showing any Manchester code
     

Share This Page