Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Recommend me microcontroller for this project

Gaber Mohamed Boraey

Full Member level 5
Full Member level 5
Joined
Feb 26, 2015
Messages
254
Helped
4
Reputation
10
Reaction score
11
Trophy points
1,298
Visit site
Activity points
2,979
Hello
I need Pic for this project concept
Messenger_creation_B5D6CB61-64D6-4D45-9914-069E623339B2.jpeg


3 buttons for control 6 led strips, and 2 buttons for brightness control

I need the project fit in 20*13 mm pcb
Messenger_creation_9720802F-9A34-4441-BAB4-D0F9BD1FAC83.jpeg


[MODERATOR ACTION] Picture resized to a reasonable scale
 
Last edited by a moderator:
You are going to need a bigger PCB if you want it to hold the MCU, 5 buttons, the ancillary components (supply bypass capacitors etc.) and (presumably) connectors for the power supply/battery and LED strips.
Are the LED strips similar to the WS2812B LEDs?
You will need a minimum of 5 GPIO pins for the switches, 6 for the LED strips (2 each). That means you will need an MCU with at leat 16 pins.
What level of embedded programming experience do you have? What languages?
Do you want to use an MCU with internal pull-up or pull-down resistors (smaller footprint but only some MCUs have this) or are you happy to have these as external components (certainly will not fit on a small board with everything else)
You may need a small amount of RAM but my guess is that quite a few K of Flash memory will be needed.
I suggest that you work out the schematic first and then use the Microchip product selection page to find a suitable MCU.
(To be honest, going by the way the question is asked, I suspect that you may be in over your head at this stage. Perhaps get some experience with PIC programming, especially how to develop embedded apps, how to interface with the switches [there are traps such as contact bounce to consider] and also how to control the LED strips [there are libraries available but they may require quite a bit of flash memory space]. Start slowly and step by step build your experience.)
Susan
 
If PCB room is your concern, I'd rather think of a recent PIC18F in small SMD package, can be as small as 4x4 mm.
However, the overall picture isn't clear. you are showing a rather long switch PCB, what's the place of the said 20x13 mm PCB, why an additional PCB?
 
If you are dimming with PWM I would suggest an ESP32, they are cheap and easy to find with lots of programming tools and development kits. Just ignore the WiFi and Bluetooth functions if you don't want them. The nice thing is that all the I/O pins can be independently driven by PWM modules and there are plenty of them. Also has NVRAM feature so you can save the settings through a power down.

Brian.
 
If PCB room is your concern, I'd rather think of a recent PIC18F in small SMD package, can be as small as 4x4 mm.
However, the overall picture isn't clear. you are showing a rather long switch PCB, what's the place of the said 20x13 mm PCB, why an additional PCB?
Can you share a datasheet?
--- Updated ---

If you are dimming with PWM I would suggest an ESP32, they are cheap and easy to find with lots of programming tools and development kits. Just ignore the WiFi and Bluetooth functions if you don't want them. The nice thing is that all the I/O pins can be independently driven by PWM modules and there are plenty of them. Also has NVRAM feature so you can save the settings through a power down.

Brian.
I've looked and all are modules, can you share datasheet with size I need?
What language programming?
 
The data sheets are all on the manufacturers web site: https://www.espressif.com/en/products/socs
You can get development boards, usually with a USB interface for communication or programming, or postage stamp sized modules or the bare IC. I would strongly suggest the small modules (WROOM modules) as they contain the crystal and extra EEPROM.

You can program them in various languages, I prefer C++ in the Arduino IDE but there are several others.

Brian.
 
Okay, thanks
I'm OK with 16f886, as it's available in local market and it does the job
Do you have an idea of the command used in programming for doing the above logic?
The pwm control I know
Can you share?
If button is pressed, led is on, and stay on
If pressed again, turn off that led and light another led on different pin
And if pressed again, turn off the last led
 
You can always use a block language coder to generate code. This example
handles 4 LEDs, trivial to add more. Debounces button press/release and then
handles next LED on, prior off.....simple. The blocks you config tool then converts
to Arduino code, you can see in right hand window.

1733576306154.png


There are a number of block programmers out there, mBlock, NodeRed, Scratch, Visuino, Tuniot (easy
wireless applications)......all with common features and additional tool specific capabilities.


Regards, Dana.
 
By the way, can I control
You can always use a block language coder to generate code. This example
handles 4 LEDs, trivial to add more. Debounces button press/release and then
handles next LED on, prior off.....simple. The blocks you config tool then converts
to Arduino code, you can see in right hand window.

View attachment 195806

There are a number of block programmers out there, mBlock, NodeRed, Scratch, Visuino, Tuniot (easy
wireless applications)......all with common features and additional tool specific capabilities.


Regards, Dana.
Interesting, does it generate code for Pic?
 
There is a similar PIC application. Cannot remember name of it.

"Harmony" was a partial approach if I rut there is another.....

There are others here that can comment.....


Regards, Dana.
 
If you look on the Microchip forum site as well as performing a Google (or other browser) search then you will find many examples of code to debounce switches and control PWM modules.
In general the easiest way to program Microchip MCUs is to write in C and then use a PicKit 3 (or 4 or 5). [Microchip do provide the MCC tool but many have found that it is harder to use and generates more convoluted code that simply programming the code for each module directly. I would recommend that you do not start your journey with the Microchip products with the MCC - but that is just my personal opinion.]
I assume that you are going to use the 44 pin PFN package (which is 8x8mm) or the 44 pin TQFP (10x10mm) package - either way you will not have much room left for anything else on a 20x13mm PCB (as mentioned in your original posting).
I strongly suggest that you decide what are your critical (and cannot be changed) parameters and then create a design in something like KICAD (which is free and can let you create the schematic and PCB layout) to develop a project that will actually fit. Don't forget that you will need to program the MCU (either before it is soldered to the PCB - in which case you need to be certain that the code is 100% correct - or to add a programming header to the PCB). As I mentioned before, bypass capacitors, connectors for the switches, LED strips, battery (or whatever power source you are using) and any other components required (capacitors, pull up/down resistors perhaps and maybe a crystal and its capacitors) all need to be accommodated.
Susan
 
Hello
I need Pic for this project concept
View attachment 195751

3 buttons for control 6 led strips, and 2 buttons for brightness control

I need the project fit in 20*13 mm pcb
View attachment 195753

[MODERATOR ACTION] Picture resized to a reasonable scale
Why do you need a PIC ? You need a state machine design 1st with specs.
You have not even defined the I/O parameters for voltage and current.

If ON whe do you need to push 4 times to turn off?

Where is the dimmer function? I only read a temperature function of light.

1733706328145.png
 
I would recommend that you do not start your journey with the Microchip products with the MCC - but that is just my personal opinion.]
why?
--- Updated ---

Block programing for PIC :




Regards, Dana.
thanks alot i will try
--- Updated ---

Block programing for PIC :




Regards, Dana.
thanks alot i will try
 
does it generate c code?

Response from ChatGPT :

Here’s a detailed list of block-based programming software for programming Microchip PIC microcontrollers, along with the output programming language for each:




1. Flowcode


  • Output Language: C
  • Description: Flowcode is a powerful graphical programming tool that supports PIC microcontrollers and generates C code, which can be compiled using Microchip's MPLAB XC compilers.
  • Applications: Education, prototyping, and professional embedded system development.



2. Blockly for PIC


  • Output Language: C
  • Description: A customized version of Blockly adapted for PIC microcontrollers. It allows users to drag and drop blocks to generate C code compatible with MPLAB IDE.
  • Applications: Simplified programming for beginners and educational projects.



3. PICAXE Programming Editor (Blockly Integration)


  • Output Language: BASIC (specific to PICAXE microcontrollers, which are based on PIC chips)
  • Description: The PICAXE Programming Editor includes Blockly as an optional interface. It translates the blocks into BASIC code for execution on PICAXE microcontrollers.
  • Applications: Educational projects and simple automation systems.



4. Snap4Arduino (Custom PIC Adaptations)


  • Output Language: C/C++ (with adaptation)
  • Description: Though designed for Arduino, some community efforts allow its adaptation for certain PIC microcontrollers. It uses Scratch-like blocks to generate C/C++ code.
  • Applications: Introductory projects and simple hardware control.



5. mBlock (Extended for PICs)


  • Output Language: C (with additional plugins for PICs)
  • Description: mBlock, based on Scratch, supports various microcontrollers and can be extended for PICs. It generates C code, but requires additional configurations.
  • Applications: Beginners learning embedded systems programming.



6. Ardublock for MPLAB (Custom Setup)


  • Output Language: C
  • Description: An open-source block programming environment originally for Arduino but adaptable for PIC microcontrollers. It requires integration with MPLAB and a compatible toolchain.
  • Applications: Advanced users who want a Blockly-style interface for PICs.



7. CircuitBlocks (Adaptable)


  • Output Language: C
  • Description: A graphical programming tool designed for various microcontrollers that can be adapted for PICs. It uses a block interface to generate C-like code.
  • Applications: Prototyping and quick circuit control.



Summary Table


SoftwareOutput LanguageApplications
FlowcodeCEducation, prototyping, professional embedded systems
Blockly for PICCEducation, beginners, quick prototyping
PICAXE Programming EditorBASICEducation, simple automation, PICAXE microcontrollers only
Snap4Arduino (PIC)C/C++Educational projects, custom configurations for PICs
mBlockCBeginners, general microcontroller programming
Ardublock for MPLABCAdvanced users, custom setup for PIC integration
CircuitBlocksCPrototyping, simple hardware control

Each tool is tailored to specific levels of expertise and project requirements, with Flowcode and Blockly for PIC being the most straightforward and widely used for programming PIC microcontrollers.
 
Response from ChatGPT :

Here’s a detailed list of block-based programming software for programming Microchip PIC microcontrollers, along with the output programming language for each:




1. Flowcode


  • Output Language: C
  • Description: Flowcode is a powerful graphical programming tool that supports PIC microcontrollers and generates C code, which can be compiled using Microchip's MPLAB XC compilers.
  • Applications: Education, prototyping, and professional embedded system development.



2. Blockly for PIC


  • Output Language: C
  • Description: A customized version of Blockly adapted for PIC microcontrollers. It allows users to drag and drop blocks to generate C code compatible with MPLAB IDE.
  • Applications: Simplified programming for beginners and educational projects.



3. PICAXE Programming Editor (Blockly Integration)


  • Output Language: BASIC (specific to PICAXE microcontrollers, which are based on PIC chips)
  • Description: The PICAXE Programming Editor includes Blockly as an optional interface. It translates the blocks into BASIC code for execution on PICAXE microcontrollers.
  • Applications: Educational projects and simple automation systems.



4. Snap4Arduino (Custom PIC Adaptations)


  • Output Language: C/C++ (with adaptation)
  • Description: Though designed for Arduino, some community efforts allow its adaptation for certain PIC microcontrollers. It uses Scratch-like blocks to generate C/C++ code.
  • Applications: Introductory projects and simple hardware control.



5. mBlock (Extended for PICs)


  • Output Language: C (with additional plugins for PICs)
  • Description: mBlock, based on Scratch, supports various microcontrollers and can be extended for PICs. It generates C code, but requires additional configurations.
  • Applications: Beginners learning embedded systems programming.



6. Ardublock for MPLAB (Custom Setup)


  • Output Language: C
  • Description: An open-source block programming environment originally for Arduino but adaptable for PIC microcontrollers. It requires integration with MPLAB and a compatible toolchain.
  • Applications: Advanced users who want a Blockly-style interface for PICs.



7. CircuitBlocks (Adaptable)


  • Output Language: C
  • Description: A graphical programming tool designed for various microcontrollers that can be adapted for PICs. It uses a block interface to generate C-like code.
  • Applications: Prototyping and quick circuit control.



Summary Table


SoftwareOutput LanguageApplications
FlowcodeCEducation, prototyping, professional embedded systems
Blockly for PICCEducation, beginners, quick prototyping
PICAXE Programming EditorBASICEducation, simple automation, PICAXE microcontrollers only
Snap4Arduino (PIC)C/C++Educational projects, custom configurations for PICs
mBlockCBeginners, general microcontroller programming
Ardublock for MPLABCAdvanced users, custom setup for PIC integration
CircuitBlocksCPrototyping, simple hardware control

Each tool is tailored to specific levels of expertise and project requirements, with Flowcode and Blockly for PIC being the most straightforward and widely used for programming PIC microcontrollers.
thanks alot
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top