Issues with PIC12F675 range of MicroChips
Date : 10.10.2020
Time: 18:18:06
Hi all
Special word of thank you to the designers of SimulIDE
Its is very impressive
As with all developments I am having one or two issue which I'm hoping someone can throw some light on for me please
When using the IDE to create a basic simulation of 12F675 for simply flashing an LED I am finding that only one port works as output
Ive tried various changes in the code itself then re compiled to hex so as to upload to the simulated device but to no avail
Currently I am testing this to see how this performs
I'm use MPlabX with XC8 compiler to write the code for this so as to see how this performs not that it should make any difference as well we all know Microchip does have a very high standard and after all this is a question of assembler compiled to hex
As this works with GP5 only and I can modify the code easily by simply changing one port pin as suitable output whilst setting TRISIO to all out there should not be any issues as far as I can tell
I'm using Linux openSUSE leap 15.1 as base OS with both 32 bit 64 bit C binaries with simulIDE in 64 bit mode kde environment
Ive uploaded the entire project plus hex plus MPLABX project to github for down load so that all may see this
Advice and rectifications if you can see this would be greatly appreciated as I see this as having a great future
Would someone in your team be kind enough to look into this from me
Mark Harrington and link for your inspection is available on git hub
Code using XC8 is below although all is included at github , address above as quoted inclusive MP4 desktop recording showing all that Ive done to date
Date : 10.10.2020
Time: 18:18:06
Hi all
Special word of thank you to the designers of SimulIDE
Its is very impressive
As with all developments I am having one or two issue which I'm hoping someone can throw some light on for me please
When using the IDE to create a basic simulation of 12F675 for simply flashing an LED I am finding that only one port works as output
Ive tried various changes in the code itself then re compiled to hex so as to upload to the simulated device but to no avail
Currently I am testing this to see how this performs
I'm use MPlabX with XC8 compiler to write the code for this so as to see how this performs not that it should make any difference as well we all know Microchip does have a very high standard and after all this is a question of assembler compiled to hex
As this works with GP5 only and I can modify the code easily by simply changing one port pin as suitable output whilst setting TRISIO to all out there should not be any issues as far as I can tell
I'm using Linux openSUSE leap 15.1 as base OS with both 32 bit 64 bit C binaries with simulIDE in 64 bit mode kde environment
Ive uploaded the entire project plus hex plus MPLABX project to github for down load so that all may see this
Advice and rectifications if you can see this would be greatly appreciated as I see this as having a great future
Would someone in your team be kind enough to look into this from me
Mark Harrington and link for your inspection is available on git hub
Code using XC8 is below although all is included at github , address above as quoted inclusive MP4 desktop recording showing all that Ive done to date
- Code:
/*
* File: main.c
* Author: mark david harrington
*
* Created on 10 October 2020, 13:37
*/
#include <xc.h>
#define _XTAL_FREQ 4000000
#define LED GPIObits.GP5
/* Configuration bits */
#ifdef _PIC12F675_H_
#pragma config CP = OFF, MCLRE = ON, FOSC = INTRCIO, WDTE = OFF, BOREN =OFF
#endif
/* Configuration bits */
#ifdef _PIC12F683_H_
#pragma config CP = OFF, MCLRE = ON, FOSC = INTOSCIO, WDTE = OFF, BOREN =OFF
#endif
void InitPic (void);
void main(void)
{
/* PICMicro initialization */
InitPic();
/* Never ending cycle...*/
while(1)
{
LED^=1; /* LED alternate ON and OFF */
__delay_ms(1000); /* delay macro (200ms) */
}
}
void InitPic (void)
{
/* I/O port configuration */
GPIO = 0x00; // clear port down
#ifdef _PIC12F675_H_
CMCON = 0x07; /* Disable comparators */
#endif
ANSEL = 0x00; /* Disable A/D module */
TRISIO = 0x00; /* All output is set as OUTPUT */
WPU = 0; /* Disable internal pull-ups */
OPTION_REG = 0x80; /* Disable internal pull-ups */
}
- Code:
:020000040000FA
:02000000FD2BD6
:1007A600831285010730990083169F018501950103
:1007B600803081000800D3238312050EA000200C90
:1007C6000139A0000130A006A00EA00D05082006E4
:1007D600DF39200685000630A2001330A100AD30B7
:1007E600A000A00BF42BA10BF42BA20BF42BFB2BDC
:0807F600DF2B00288301DE2B3C
:02400E00B431CB
:00000001FF
Last edited by MD Harrington on Sun Oct 11, 2020 3:25 am; edited 1 time in total (Reason for editing : upoad image)