Hi nmindana,
There are a few problems with your Flowchart.
1). configuration. Change settings in Expert Config Screen' (go into the configuration menu ('Chip Configure..')
click on 'Switch To Expert Config Screen') there you need to disable watchdog and LVP etc See:
viewtopic.php?f=26&t=6936
Osscon:
You only need this if using the internal oscillator. If you are using EB006 with crystal, then you can remove osccon = 0x7E;
and change Oscillator selection to HS.
2) Using Keypad and LCD with 16F88
This is more advanced. You can't just use both keypad and LCD on the same port as you have got, without disabling
Enable of LCD, change port B to input, enable port interrupt, detect keypad, Disable port interrupt, then write to LCD etc.
I have not tried this but in theory is possible
You will not be able to use either keypad OR LCD on portA, since only RA0 to RA5 is used on EB006, and RA5 on 16F88 is input only.
To Keep flowchart simple it may be best to change the target device to a different one with more pins.
3)Port Interrupt Macro. its not a good idea to call another macro from within an interrupt macro. This could lead to
corruption of code, and exceed stack usage!
When you compile to hex or to target device, you are warned about this, in the message window.
Code: Select all
Warning: function never returns: 'FCM_compare'
Building CASM file
Serious Warning: Call stack usage exceeds:8!
Call Stack Usage Report
=======================
main and Task(s): hw used:5, exceeded by:0
interrupt: hw used:6, exceeded by:0
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_Cursor' called by more than one
asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_PrintNumber' called by more than one
asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'FCD_KeyPad0_GetKeypadAscii' called by more than one
asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_RawSend' called by more than one
asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'delay_us' called by more than one asynchronous thread
(main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function '__rom_get' called by more than one asynchronous thread
(main/Task, interrupt, interrupt low)
Memory Usage Report
Martin