"hello world" with 18f6680


Closed Thread
Page 1 of 3 123 LastLast
Results 1 to 40 of 92
  1. #1
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166

    Default "hello world" with 18f6680

    i know someone is going to say something about reading the datasheet, or looking in the manual, but im having some trouble with this, and im sure its just something small.

    heres the code, and im flashing a LED on D.4 and setting all the config stuff in my programmer, since i cant figure out the defines.

    <code>
    DEFINE OSC20
    PORT.4 = 0

    start:
    high PORTD.4
    pause 500
    Low PORTD.4
    pause 500
    goto start

    end
    </code>

    the hardware is a PIC18F6680, with a LED and resistor connected to ground.

    the config fuses HS OSC, brownout 2.0v, watchdog enabled, lvp disabled

  2. #2
    Join Date
    Jun 2006
    Location
    Mountain View California
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Could it be that you forgot to put a space between "OSC" and "20"?
    Try changing DEFINE OSC20 to DEFINE OSC 20.

    Ben

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


    Did you find this post helpful? Yes | No

    Default

    don't tell us what your problem is in case we could help
    Steve

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

  4. #4
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    yeah, i guess i should mention whats happening or not happening...

    so the LED doesnt light up, ive checked for voltage with my meter and theres nothing from the pin to ground..

    i should also mention that i caught that missing space (OSC 20) right after i posted, but it still didnt help... the hardware should be good, i think im jsut missing something in the software.

  5. #5
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ok, here is the last version of my code... still cant get it to work...

    <code>

    DEFINE OSC 20

    TRISA = 0
    TRISB = 0
    TRISC = 0
    TRISD = 0
    TRISE = 0
    TRISF = 0
    trisg = 0

    LCDA1 VAR PORTE.6
    LCDB1 VAR PORTE.7
    LCDC1 VAR PORTE.3
    LCDD1 VAR PORTG.4
    LCDE1 VAR PORTG.3
    LCDF1 VAR PORTE.5
    LCDG1 VAR PORTE.4
    LCDDP1 VAR PORTG.2

    LCDA2 VAR PORTD.2
    LCDB2 VAR PORTD.3
    LCDC2 VAR PORTE.0
    LCDD2 VAR PORTG.0
    LCDE2 VAR PORTG.1
    LCDF2 VAR PORTD.1
    LCDG2 VAR PORTD.0
    LCDDP2 VAR PORTE.1

    LCDA3 VAR PORTD.6
    LCDB3 VAR PORTD.7
    LCDC3 VAR PORTB.0
    LCDD3 VAR PORTB.1
    LCDE3 VAR PORTE.2
    LCDF3 VAR PORTD.5
    LCDG3 VAR PORTD.4

    pause 500

    'MAIN PROGRAM\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

    start:
    high LCDa1
    high LCDb1
    high LCDc1
    high LCDd1
    high LCDe1
    high LCDf1
    high LCDg1
    high LCDdp1

    high LCDa2
    high LCDb2
    high LCDc2
    high LCDd2
    high LCDe2
    high LCDf2
    high LCDg2
    high LCDdp2

    high LCDa3
    high LCDb3
    high LCDc3
    high LCDd3
    high LCDe3
    high LCDf3
    high LCDg3

    pause 500
    low LCDa1
    low LCDb1
    low LCDc1
    low LCDd1
    low LCDe1
    low LCDf1
    low LCDg1
    low LCDdp1

    low LCDa2
    low LCDb2
    low LCDc2
    low LCDd2
    low LCDe2
    low LCDf2
    low LCDg2
    low LCDdp2

    low LCDa3
    low LCDb3
    low LCDc3
    low LCDd3
    low LCDe3
    low LCDf3
    low LCDg3
    pause 500
    goto start
    end
    </code>

    so it powers up, but it doesnt put and of the ports high.. there is only one LED connected, the rest of the pins arent connected. but i have put my meter across them to see if there is any voltage...

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


    Did you find this post helpful? Yes | No

    Default

    3 things,
    1. no configuration fuses.. make sure you set the right osc mode
    2. disable all multiplexed analog converter, comparator, voltage reference or else fancy stuff
    3. with 18Fs, you want to use LAT instead of PORT to avoid R-M-W behaviour. The best solution is often write to the whole port in one shot instead of using multiple High/Low lines.
    Steve

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

  7. #7
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ok....

    1. i wasn't sure how to set the fuses before, but since then i have discovered the .inc file, and i have changed them in there. if i try to add it to the code too, it says I'm overwriting code space.

    2. i knew i had to do that... i just forgot...

    3. i have never even heard of LAT.. is it in the manual? i had a quick look but couldn't find it there. and when you say write the whole port instead of multiple lines, do you mean all of portb at a time? or am i missing something??

    thanks for the help.. i tried using a PIC18F before, and ran into a lot of problems too, so i put that project on hold for a while and went back to 16F's...

    heres the thread about the Robot i built using a PIC18F6585.. http://www.picbasic.co.uk/forum/show...light=treadbot

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Awwwww,

    I wondered what happened to the Treadbot.

    Poor little guy. Back-burners such a lonely place. (except at my house, lot's of company there)

    Hope you get back to it some day.
    And I hope I can help out more when you do.
    <br>
    DT

  9. #9
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    yeah, it seemed to work until the motors got up to a certain speed, adn then it would just freeze.. i started this "project" just to learn the 18f

  10. #10
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    If you put +5vdc on portd.4 does the LED light? If not then it's a hardware problem, if it does then try something really simple like;

    DEFINE OSC 20
    HIGH PORTD.4
    END

    Did the port go high? I took a quick look at the datasheet for you PIC, and I didn't see that PortD.4 is multiplexed, so it should work fine.

    LAT is not in the manual, it is in the datasheet, it's a memory register, you've probably seen it as LATA, or LATB, etc.

    Usually when I have this problem it's because I put the LED in backwards, even though I checked it three times before I soldered it.

    Merry Christmas!

    Jerry.
    If your oscilloscope costs more than your car...

  11. #11
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    i have actually made d.4 an I/O connection on my board.. there is three pins, ground, + and signal (just like a servo). so i had an LED hooked to it, but since then, i have just hooked up my multimeter, and its not showing any voltage across signal to ground when i put it high. i do get 5V across the + and ground. and i can write code to the PIC, and i can read the same code back off the PIC.. its a double stacked board, and i soldered the headers into both boards, so i may need to try to get them apart to look inside where the PIC is..

  12. #12
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Isn't that always the way? Hopefully you'll see something easy to fix when you get it opened up, it's got to be something simple. The 18F chips are great once you get the hang of them, just keep at it, and remember, we do this for fun right?

    Merry Christmas!

    Jerry.
    If your oscilloscope costs more than your car...

  13. #13
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    i did find one little thing... one pin from my OSC was touching a 5V line... so i fixed that, but im still not getting any voltage on any pins...

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


    Did you find this post helpful? Yes | No

    Default

    How are you programming the fuses? In the code or the *.inc??

    Either way, post the config settings. The 18s are different ...


    This is a snippet of my 18F4320.inc
    Code:
    	
    
    	
    	CONFIG OSC = HS
    
    	CONFIG LVP = OFF
    
    	CONFIG BOR = OFF
    
    	CONFIG MCLRE = OFF
    
      
    
      ;      __CONFIG    _CONFIG1H, _XT_OSC_1H
    
      ;      __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    
      ;      __CONFIG    _CONFIG4L, _LVP_OFF_4L
    Dave
    Always wear safety glasses while programming.

  15. #15
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ok... i have tried to get this to work lots since last year, adn it still wont do anything. i have pulled apart both boards and checked all the solder joints with my meter, and have gone over and over the design to make sure everything is wired properly. i have replaced the OSC with another one. there is .1uf caps spead out over the board, and i have a 1M ohm resistor from PGM to ground.

    i can program code into the chip, and i can read it back, it just wont run. i have an LED connected from D4 to a resistor and then to gnd. all the other ports i have put my meter on and watched for voltage changes.

    my code is:

    DEFINE OSC 20
    pause 500
    start:
    High porta.0
    high porta.1
    High porta.2
    high porta.3
    High porta.4
    High porta.5
    High porta.6
    High porta.7

    High portb.0
    high portb.1
    High portb.2
    high portb.3
    High portb.4
    High portb.5
    High portb.6
    High portb.7

    High portc.0
    high portc.1
    High portc.2
    high portc.3
    High portc.4
    High portc.5
    High portc.6
    High portc.7

    High portd.0
    high portd.1
    High portd.2
    high portd.3
    High portd.4
    High portd.5
    High portd.6
    High portd.7

    High porte.0
    high porte.1
    High porte.2
    high porte.3
    High porte.4
    High porte.5
    High porte.6
    High porte.7

    High portf.0
    high portf.1
    High portf.2
    high portf.3
    High portf.4
    High portf.5
    High portf.6
    High portf.7

    High portg.0
    high portg.1
    High portg.2
    high portg.3
    High portg.4
    high portg.5
    High portg.6
    high portg.7

    pause 300

    low porta.0
    low porta.1
    low porta.2
    low porta.3
    low porta.4
    low porta.5
    low porta.6
    low porta.7

    low portb.0
    low portb.1
    low portb.2
    low portb.3
    low portb.4
    low portb.5
    low portb.6
    low portb.7

    low portc.0
    low portc.1
    low portc.2
    low portc.3
    low portc.4
    low portc.5
    low portc.6
    low portc.7

    low portd.0
    low portd.1
    low portd.2
    low portd.3
    low portd.4
    low portd.5
    low portd.6
    low portd.7

    low porte.0
    low porte.1
    low porte.2
    low porte.3
    low porte.4
    low porte.5
    low porte.6
    low porte.7

    low portf.0
    low portf.1
    low portf.2
    low portf.3
    low portf.4
    low portf.5
    low portf.6
    low portf.7

    low portg.0
    low portg.1
    low portg.2
    low portg.3
    low portg.4
    low portg.5
    low portg.6
    low portg.7
    pause 300
    goto start
    end



    and the fuses are set as:

    OSC "HS"
    System clock "disabled"
    power up timer "disabled"
    brown out reset "enabled"
    brown out voltage "2.0V"
    watchdog timer " enabled"
    watchdog postscaler "1:128"
    ccp2 multiplexed with "RC1"
    mclr pin function "reset"
    overflow reset "enabled"
    LVP "disabled"
    boot block "not protected"

    im using microcode studio, mpasm and an epic programmer.

  16. #16
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    [QUOTE=dragons_fire;49764]
    Code:
    DEFINE OSC 20
    pause 500
    trisa = 0 : trisb = 0 : trisc = 0 : trisd = 0
    trise = 0 : trisf = 0 : trisg = 0 : trish = 0
    start:
    porta = $ff : portb = $ff : portc = $ff
    portd = $ff : porte = $ff : portf = $ff
    portg = $ff
    pause 300
    porta = 0 : portb = 0 : portc = 0 : portd = 0
    porte = 0 : portf = 0 : portg = 0
    pause 300
    goto start
    end
    Easier to read in my mind And accomplishes the same thing.
    What I like to do when I'm having initial problems is something like this:
    counter var word : trisb = 0 : trisd = 0
    main:
    counter = counter + 1
    portb = counter.lowbyte : portd = counter.highbyte
    goto main
    Something simple like that. At least that way, on each successive pin, I'll see half the frequency of the previous pin.

    All of the Vdd/AVdd tied together as well as the Vss/AVss? Multiple power/ground pins ya know... Actually, I know you know...Treadbot...worked...sort of...sorry to hear it didn't work 100% for ya. Looked like fun.
    Pull up to +5v on MCLR? Preferably thru a resistor...
    Volts on the OSC pins should give about a 1.5v signal, give or take a bit.

  17. #17
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default fuses

    Hello Dragon's_fire.
    Here are some config fuses taken from the .INC in the MPASM directory. it might help.
    Code:
    @ __CONFIG _OSC_HS_1H & _LVP_OFF & _WDT_ON_2H & _BOR_OFF_2L &  _PWRT_ON_2L & _WRT0_OFF_6L & _CPD_OFF_5H
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  18. #18
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    Skimask, i tried that code you posted, still nothing,... im going up to my otehr computer to see if i can attach a copy of the schematic... i dont think i messed up the hardware, but im kinda scared i did.. when i put my meter across:
    OSC1-OSC2, it shows 0V
    OSC1-GND, it shows 2.5V
    OSC2-GND, it shouws 3.6V

    PGM is grounded through a 1Mohm resistor,
    all power and ground pins are connected including Avdd and Avss

  19. #19
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    heres the schematic.. i cleaned it up a little, and all the "empty" pins go to headers for i/o that go to a different board. its a screens hot from eagle cad, so you also wont see the v-reg and capacitors on it either. the voltage regulator is on the top board, and the capacitors were drawn separately, and then spaced around when the board was routed.


  20. #20
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dragons_fire View Post
    OSC1-OSC2, it shows 0V
    OSC1-GND, it shows 2.5V
    OSC2-GND, it shouws 3.6V
    OSC1-2 - should show more than that, but your meter probably won't respond quick enough. Got an AC setting you can try?

    OSC1/2 - GND - both sound good to me.

    In your schematic, is that a 20Mhz resonator, crystal?
    Try changing your config's to use a different type of clock, R/C, external, whatever, see what happens.

  21. #21
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    i tried checking voltage again. i get around 3mV DC across OSC1-OSC2. on the AC setting it shows nothing but im using a digital meter which might be too slow. i dug out my analog meter, but i have no clue where the leads are for it....

    the OSC is a 20.0Mhz ceramic resonator with built in caps. its mountet fairly close to the PIC.

    i have tried some of the different clock settings with no luck and i have switched resonators once just in case it was a bad one...

  22. #22
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dragons_fire View Post
    i get around 3mV DC across OSC1-OSC2
    That sounds a bit goofy, but I'm not looking at what you're dealing with.

    Have you tried a SLOWER oscillator yet, like the R/C, anything, just a signal enough to get it moving?
    Heck anything, clicking a push button on/off on the OSC1 pin?

    And give these config settings a shot:

    OSC "HS" - good

    System clock "disabled" - good enough, but I like to leave it enabled so I can play with
    changing clock speeds

    power up timer "disabled" - I'd enable it, gives the clocks more time to spool up and stabilize, causes fewer errors, especially at higher speeds

    brown out reset "enabled" - ok, if you're into that sort of thing

    brown out voltage "2.0V" - good

    watchdog timer " enabled" - don't need it, so disable it

    the rest are good...in my mind anyways...

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


    Did you find this post helpful? Yes | No

    Default

    Are you setting the fuses in the code or in the *.inc?

    Either way, Post what you have, I know what you say you have but how? The 18s sometimes are a bit "picky" this way. At least with different versions of PBP.
    Dave
    Always wear safety glasses while programming.

  24. #24
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    there in the inc file.. i was just reading them from the epic programmer. it has a list of what everything is set as, and i can change it there too..

    i made it all with SMT stuff, and its pretty tiny (yes ive checked for crossed traces) so i have no other OSC's to connect to it. and i think its too small to wire up jumpers too...

  25. #25
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    heres my INC file..


    NOLIST
    ifdef PM_USED
    LIST
    "Error: PM does not support this device. Use MPASM."
    NOLIST
    else
    LIST
    LIST p = 18F6680, r = dec, w = -311,w = -230, f = inhx32
    INCLUDE "P18F6680.INC" ; MPASM Header
    __CONFIG _CONFIG1H, _OSC_HS_1H
    __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L
    NOLIST
    endif
    LIST
    EEPROM_START EQU 0F00000h
    BLOCK_SIZE EQU 8

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


    Did you find this post helpful? Yes | No

    Default

    See post 14 of this thread. One of the PBP versions fixed this but I am not sure which one, Been doing it this way since 2.43. Still works for me.
    Dave
    Always wear safety glasses while programming.

  27. #27
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    so i want it like this???


    CONFIG OSC = HS

    CONFIG LVP = OFF

    CONFIG BOR = OFF

    CONFIG MCLRE = ON


    and not like this??

    __CONFIG _CONFIG1H, _OSC_HS_1H
    __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L

    i tired changing it, and i switched to a 10Mhz resonator that i know works, and im still having this problem.. do you think it could be the chip? or if there was a problem with it, would i still be able to program it and read the code back??

    thanks for the help guys

  28. #28
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dragons_fire View Post
    i tired changing it, and i switched to a 10Mhz resonator that i know works, and im still having this problem.. do you think it could be the chip? or if there was a problem with it, would i still be able to program it and read the code back??
    I'd have to say a resounding yes.
    I don't know how many transistors any given PIC has in it, but think about it for a second.
    Every I/O pin except Vdd/Vss/MCLR/OSC/PGD/PGC/PGM could be blown out, the program is running but you can't see it.
    The oscillator section itself could be fried. This PIC apparently doesn't have a backup internal oscillator of any sort, so that options out.
    Could be any number of a thousand things, so many 'sections' packed in there, and ICSP only uses a few of them.

    However, I'll also say that I've only completely fried one PIC in 10-12 years of messing with them. One pin here, one pin there, input driver, output driver (usually the case)....yes, one here and there, but not a whole chip.

  29. #29
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ok... i havent done anything "bad" to this one either... and ive wrecked a few so far.. mostly inserting into sockets backwards!!! and the last one i did, was when i first started SMT stuff, i soldered a 44-tqfp 16f877a with the writing up, so pin 12 (i think) was where pin 1 shoulda been.. i didnt look at the little dot in the corner.... i kept trying to program it, and for some reason it wouldnt program!!!

    ill take a picture of the board in a few minutes... dont make fun of the solder, im doing it all by hand with a $20 iron.. i have also soldered parts multiple times trying different things.. which reminds me, when i can afford it, i will probably buy some 18f's in DIPs so i can breadboard it and play around... i just cant seem to get them to work and im not sure why...

  30. #30
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dragons_fire View Post
    ok... i havent done anything "bad" to this one either... and ive wrecked a few so far.. mostly inserting into sockets backwards!!! and the last one i did, was when i first started SMT stuff, i soldered a 44-tqfp 16f877a with the writing up, so pin 12 (i think) was where pin 1 shoulda been.. i didnt look at the little dot in the corner.... i kept trying to program it, and for some reason it wouldnt program!!!
    Isn't nothing anybody else hasn't done
    I've done it too, but I have yet to smoke one.

    dont make fun of the solder, im doing it all by hand with a $20 iron..
    Have you seen my webpage with the picture of the old mp3 player on it?
    That'll get you laughing...
    Do yourself a favor and get your hands on a good soldering station...nothing like it, some flux, alcohol dispensor, acid brushes, all that good stuff.
    I went thru a 7 week micro-mini- circuit card repair class last year (spent about 6 1/2 of those 7 weeks with my head buried in a microscope). I got back and bought a load of good tools for soldering. Made that part of it LOADS easier, to include soldering and desoldering 80 pin TQFP's on and off PCBs.

  31. #31
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    i looked at you website a while ago, i dont remember the cd player, but im gonna have to go back for another look.

    looking at my board on the picture, it actually doesnt look as bad as i thought... (except where the OSC is.. )



    the 5-pin 90* header is the ICSP
    the 12-pin 90* headers on each end go to sensors and servos and everything else i can imagine
    the 5-pin headers go to the top board that has the power circuit on it. it also has a basic LCD display and the power headers to go to the servos/sensors

    i do use flux, really small solder and flux remover...
    Last edited by dragons_fire; - 28th January 2008 at 20:03.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dragons_fire View Post
    so i want it like this???


    CONFIG OSC = HS

    CONFIG LVP = OFF

    CONFIG BOR = OFF

    CONFIG MCLRE = ON


    and not like this??

    __CONFIG _CONFIG1H, _OSC_HS_1H
    __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L

    i tired changing it, and i switched to a 10Mhz resonator that i know works, and im still having this problem.. do you think it could be the chip? or if there was a problem with it, would i still be able to program it and read the code back??

    thanks for the help guys
    See this
    http://www.picbasic.co.uk/forum/show...87&postcount=6
    But I guess it was fixed in 2.47?

    Get the bread board stuff or a ZIF socket for developing. Will save a few headaches, may add a few too, but they will be different
    Dave
    Always wear safety glasses while programming.

  33. #33
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ok.... i think i saw that before, but it didnt make any sense... i think i get it now...

  34. #34
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Somethings confusing me here.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2301&stc=1&d=120156330 8" />

    The schematic shows GND on pin 1 of the ICSP connector.
    But Pin2 (+5V) goes to the center pin of the resonator.

    Is the schematic wrong? Or am I looking at the pins wrong?
    <br>
    Attached Images Attached Images  
    DT

  35. #35
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    just going through the datasheet for the 6680 again, it says i may need a resistor between OSC2 and the resonator if its an AT strip cut crystal... how do i know if i need that resistor???

  36. #36
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    Darrel, i just looked at it, and i thought you had found it.. i stuck my meter on it and it says its correct. so i went back to the schematic and looked. its the otehr 5-pin header on the schematic that is for ISCP, the one you highlighted goes to the other board, and comes from the power supply. its the straight header on the board.

    i wish you were right... then i would actually know what i did wrong...

  37. #37
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yup, should have, should have seen that.

    Can you show the board layout's?
    It's hard to follow past the via's.
    <br>
    DT

  38. #38
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ill see what i can do about the layout.. ive looked over it and it seems ok, but what do i know!!! i used eaglecads autoroute function so everything "should" be connected properly...

  39. #39
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default



    theres the image of the board, and i will attach the eagle file here too.

    i labelled all the "important" pins. the rest go to I/Os.... and MCLR2 resistor, is a 1Mohm resistor, and its for PGM. i just didnt relabel it when i put it in there... and there was an issue with the gnd side of the caps, so i ran a jumper wire from there to the ground pin..
    Attached Files Attached Files
    Last edited by dragons_fire; - 29th January 2008 at 03:02.

  40. #40
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Probably another wrong one, but I can't tell from the picture.

    Looking at some of the holes, they don't seem to be plated thru.
    It could be reflections from the other side or something.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2304&stc=1&d=120158257 0" />

    Where it would matter the most (if true) is on the +5V pin on that connector I should have been looking at the first time.
    It doesn't have a good solder joint on the top layer, which is the side the trace connects to.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2305&stc=1&d=120158283 4" />

    If the thru-hole plating is intact, it probably won't matter.
    <br>
    Attached Images Attached Images   
    DT

Similar Threads

  1. 18f6680 N/C
    By mackrackit in forum Off Topic
    Replies: 2
    Last Post: - 29th April 2008, 21:21
  2. need help with "hello world" in hyperterm
    By ericmiles in forum Serial
    Replies: 3
    Last Post: - 31st October 2007, 16:08
  3. 18F6680 and portd problems.
    By jkbh in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 6th June 2005, 11:54

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