78ATI Postat August 22, 2007 Partajează Postat August 22, 2007 Buna tuturor! Doresc sa apelez la cunostintele dvs. de programare. Am comandat un microcontroler (ma interesa sa aia 16I/0 18Pini si 8k de memorie program, sau >4k) am gasit prin "cataloagele Microchip" 18F1320. Eu am facut programul (partial, urmand acum sa il dezvolt un pic) pe un PIC16F88. Din lipsa de spatiu...va trebuii sa portez totul pe 18F1320. Doresc sa folosesc oscilatorul intern al mirocontrolerului. Cum pot face aceasta in IC-Prog? Am gasit o fereastra de acest gen, si ma uit prin datasheet-ul controlerului...momentan nici o idee. Un ajutor ar fi binevenit, lucru pentru care va multumesc de acum! Link spre comentariu
78ATI Postat August 24, 2007 Autor Partajează Postat August 24, 2007 Am gasit pe internet un mic topic despre configurarea PIC pe 16bit, astfel pentru cei interesati atasez textul respectiv: How To... Program the device fuses for 16 bit devices Posted By: Tim Box Explanation As with 14 bit cores, 16 bit fuse settings can be confusing. The confusion is compounded by the fact that unlike the 14 bit fuses 16 bit devices require more than a simple CONFIG HS_OSC , WDT_OFF. You now have to address each CONFIG byte in turn. __CONFIG CONFIG1H, OSCS_OFF_1 In fact such is the complexity in fuse setting you can no longer perform the task using the basic statement CONFIG. You are have to talk direct to Mplab with an assembler statement. It all seems too complex. But luckily it?s not impossible, with a little checking and by using the *.LPB file for the device it will all slot into place. Again as with the 14 bit core open the *.LPB file and look towards the bottom. ;Configuration Byte 1H Options OSCS_ON_1 EQU H'DF' ; Oscillator Switch enable OSCS_OFF_1 EQU H'FF' LP_OSC_1 EQU H'F8' ; Oscillator type There are a list of the fuse options available, but most importantly they are grouped into Configuration Byte Options, as indicated by the subsection headings. Above this list you will also see a list showing what the name of the config byte is called. ; CONFIG1H = Configuration Byte 1H It is then a simple matter of working your way though the list and constructing a list of @ __CONFIG statements to set the fuses required. @ __CONFIG CONFIG1H, OSCS_OFF_1 & HSPLL_OSC_1 @ __CONFIG CONFIG2L, BOR_ON_2 & BORV_20_2 & PWRT_ON_2 Remembering of cause to not leave any fuses unset as Mplab will use the default if you don?t. And it might not be what you expected. So that done you compile. Hells teeth you are presented with a load of error messages. There is one last thing to add. You have to turn off Proton+?s default configs in order to prevent you writing to the same address twice and getting complaints from Mplab. The statement is ?@ CONFIG_REQ?. Simply place this at the start of your config list and it will tell Mplab to ignore the defaults. That?s it! See also CONFIG in the Manual Example Code @ CONFIG_REQ @ __CONFIG CONFIG1H, OSCS_OFF_1 & HSPLL_OSC_1 @ __CONFIG CONFIG2L, BOR_ON_2 & BORV_20_2 & PWRT_ON_2 @ __CONFIG CONFIG2H, WDT_ON_2 & WDTPS_128_2 @ __CONFIG CONFIG3H, CCP2MX_ON_3 @ __CONFIG CONFIG4L, STVR_ON_4 & LVP_OFF_4 & DEBUG_ON_4 Link spre comentariu
Postări Recomandate
Creează un cont sau autentifică-te pentru a adăuga comentariu
Trebuie să fi un membru pentru a putea lăsa un comentariu.
Creează un cont
Înregistrează-te pentru un nou cont în comunitatea nostră. Este simplu!
Înregistrează un nou contAutentificare
Ai deja un cont? Autentifică-te aici.
Autentifică-te acum