Re: [EE] New projects on Github

Justin Richards <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.pic
Message-ID <CAKMvr85nu7UE8_2L4W5dyCnbw=HdLo5QY04jTPda_RW_jhvBeQ@mail.gmail.com>
Hi Isaac,

Thanks for sharing.

Always on the lookout for other people's code to learn from  Yours
certainly is a level up for me. So naturally I have many questions but will
keep it short.

Snip from Co-Routines/Source/CoRoutines.h






*#else   /*  defined ARDUINO */    #include <xc.h>    #define
DISABLEINTERRUPT() do{INTCONbits.GIE=0;}while(0)    #define
ENABLEINTERRUPT() do{INTCONbits.GIE=1;}while(0)    #define CLEARWATCHDOG()
CLRWDT()    tickcount_t GetTickCount( void );#endif  /*  defined ARDUINO */*

1.I am guessing The first line should read /*defined PIC */
2. 3rd and 4th lines - are the do ()while(0) a way to make the macros look
function like so it is consistent across platforms.

Or perhaps you did what you did because the following would not work. If
so, I  just cant work out why.
#if         defined ARDUINO
...
    #define DISABLEINTERRUPT noInterrupts()
...
#elif       defined AVR
...
    #define DISABLEINTERRUPT asm("cli")
...
#else   /*  defined PIC */
...
    #define DISABLEINTERRUPT INTCONbits.GIE=0...
...
There are many other lines of your code that are intriguing but I will try
to puzzle them out.

Thanks again.
justin

On Thu, Feb 13, 2025 at 8:07 PM Isaac M. Bavaresco <[email protected]>
wrote:

>  Dear All,
>
>
> I published some more projects on Github, perhaps some may be of interest
> to the members of the list.
>
> <https://github.com/Ibavaresco> <https://github.com/Ibavaresco>
>
> A few of them I simply copied from my Piclist page, others are being
> published now for the first time.
>
> Cheers,
>
> Isaac
>
>
> Their descriptions are as follow:
>
> PCADSch2KiCAD
> Program to convert ASCII P-CAD 2006 Schematics to KiCAD v8.0 format. It can
> also output P-CAD format with all the fields sorted.
>
> BCDFloat
> Routines to implement calculations with very long floating-point numbers in
> BCD format. Not particularly efficient but good for didactical purposes.
>
> Co-Routines
> A simple co-routines framework
>
> SimpleRTOS
> RTOS for microcrontrollers
>
> LCD-HD44780
> Routines to interface microcrontrollers to LCD modules based on the HD44780
> and HD44780U controller
>
> HX711
> Routines to interface microcrontrollers to the HX711 24-bit differential
> ADC
>
> OneWire
> Routines to interface microcrontrollers to 1-Wire (iButton) devices
>
> wxSimCM0
> Simulator for a generic ARM Cortex-M0 processor with a few onboard
> peripherals - Work in progress
>
> wxCesar
> Simulator for the abstract computer 'Cesar'
> <https://www.inf.ufrgs.br/arq/wiki/doku.php?id=cesar>
> <https://www.inf.ufrgs.br/arq/wiki/doku.php?id=cesar>
>
> NewFATFS
> POSIX and NewLib compatible FAT filesystem based on Chan's FatFs
>
> FileSystem
> Simple FLASH file system for embedded systems. This implementation is for
> PIC18F87J60 and AT45DB642D.
>
> <
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> Não
> contém vírus.www.avast.com <http://xn--vrus-vpa.www.avast.com>
> <
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> https://mailman.mit.edu/mailman/listinfo/piclist
>
-- 
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
https://mailman.mit.edu/mailman/listinfo/piclist
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.