26#ifndef BOARD_Breadboard_H
27#define BOARD_Breadboard_H
29#include "bsim_picsim.h"
30#include "bsim_simavr.h"
32#define BOARD_Breadboard_Name "Breadboard"
44 void SetScale(
double scale)
override;
46 std::string
GetName(
void)
override {
return BOARD_Breadboard_Name; };
47 std::string
GetAboutInfo(
void)
override {
return "L.C. Gamboa \n <lcgamboa@yahoo.com>"; };
53 int MInit(
const char* processor,
const char* fname,
float freq)
override;
54 void MEnd(
void)
override;
60 void MSetVCC(
float vcc)
override;
65 void MSetPin(
int pin,
unsigned char value)
override;
66 void MSetPinDOV(
int pin,
unsigned char ovalue)
override;
67 void MSetAPin(
int pin,
float value)
override;
68 unsigned char MGetPin(
int pin)
override;
70 void MStep(
void)
override;
72 void MReset(
int flags)
override;
74 unsigned int DBGGetPC(
void)
override;
75 void DBGSetPC(
unsigned int pc)
override;
86 int GetUARTRX(
const int uart_num)
override;
87 int GetUARTTX(
const int uart_num)
override;
94 void Draw(
void)
override;
98 return "atmega328p,atmega2560,attiny85,PIC16F1516,PIC16F18324,PIC16F18855,PIC16F1619,PIC16F1788,PIC16F1789,"
99 "PIC16F1827,PIC16F1829,PIC16F1847,PIC16F1939,PIC16F1947,PIC16F628A,PIC16F648A,PIC16F688,PIC16F84A,"
100 "PIC16F777,PIC16F819,PIC16F877A,PIC16F886,PIC16F887,PIC18F24Q10,PIC18F26K80,PIC18F27K40,PIC18F452,"
101 "PIC18F4520,PIC18F4550,PIC18F45K50,PIC18F4580,PIC18F4620,PIC18F46J50,PIC18F47K40,PIC18F67J60,"
105 void Reset(
void)
override;
107 void EvMouseButtonPress(
unsigned int button,
unsigned int x,
unsigned int y,
unsigned int state)
override;
109 void EvMouseButtonRelease(
unsigned int button,
unsigned int x,
unsigned int y,
unsigned int state)
override;
111 void EvKeyPress(
unsigned int key,
unsigned int mask)
override;
113 void EvKeyRelease(
unsigned int key,
unsigned int mask)
override;
121 unsigned short GetInputId(
char* name)
override;
Definition bsim_picsim.h:34
Definition bsim_simavr.h:56
Definition board_Breadboard.h:38
std::string GetDebugName(void) override
Get debug interface name.
Definition board_Breadboard.cc:654
int MGetArchitecture(void) override
Return board microcontroller architecture.
Definition board_Breadboard.cc:750
void MSetVCC(float vcc) override
board microcontroller set vcc
Definition board_Breadboard.cc:808
void DBGSetPC(unsigned int pc) override
board microcontroller set PC
Definition board_Breadboard.cc:981
int MGetPinCount(void) override
board microcontroller pin count
Definition board_Breadboard.cc:843
unsigned char * DBGGetRAM_p(void) override
board microcontroller get RAM memory pointer
Definition board_Breadboard.cc:995
unsigned char * DBGGetCONFIG_p(void) override
board microcontroller get CONFIG memory pointer
Definition board_Breadboard.cc:1019
void MReset(int flags) override
board microcontroller reset
Definition board_Breadboard.cc:946
int MInit(const char *processor, const char *fname, float freq) override
board microcontroller init
Definition board_Breadboard.cc:700
unsigned char * DBGGetEEPROM_p(void) override
board microcontroller get data EEPROM memory pointer
Definition board_Breadboard.cc:1043
int GetUARTTX(const int uart_num) override
Return the UART N TX pin number.
Definition board_Breadboard.cc:1138
unsigned char * DBGGetROM_p(void) override
board microcontroller get ROM (FLASH) memory pointer
Definition board_Breadboard.cc:1007
unsigned int DBGGetCONFIGSize(void) override
board microcontroller get CONFIG memory size
Definition board_Breadboard.cc:1079
void EndServers(void) override
board servers shutdown
Definition board_Breadboard.cc:1183
float MGetVCC(void) override
board microcontroller get vcc
Definition board_Breadboard.cc:819
unsigned short * DBGGetProcID_p(void) override
board microcontroller get pointer to processor ID
Definition board_Breadboard.cc:957
void SetScale(double scale) override
Set board draw scale.
Definition board_Breadboard.cc:1150
void MStepResume(void) override
board microcontroller run one or two steps to resume instruction
Definition board_Breadboard.cc:935
std::string MGetPinName(int pin) override
board microcontroller pin name
Definition board_Breadboard.cc:855
std::string GetSupportedDevices(void) override
Return a list of supported microcontrollers.
Definition board_Breadboard.h:97
int MDumpMemory(const char *fname) override
board microcontroller save non volatile memory to hex file
Definition board_Breadboard.cc:762
unsigned char MGetPin(int pin) override
board microcontroller get digital pin value
Definition board_Breadboard.cc:900
void Reset(void) override
Reset board status.
Definition board_Breadboard.cc:102
void MEnd(void) override
board microcontroller end
Definition board_Breadboard.cc:739
void RefreshStatus(void) override
Called ever 1s to refresh status.
Definition board_Breadboard.cc:148
void EvKeyPress(unsigned int key, unsigned int mask) override
Event on the board.
Definition board_Breadboard.cc:245
void Draw(void) override
Called ever 100ms to draw board.
Definition board_Breadboard.cc:326
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event on the board.
Definition board_Breadboard.cc:253
void MSetAPin(int pin, float value) override
board microcontroller set analog pin
Definition board_Breadboard.cc:889
void MStep(void) override
board microcontroller run one step
Definition board_Breadboard.cc:924
void ReadPreferences(char *name, char *value) override
Called whe configuration file load preferences.
Definition board_Breadboard.cc:224
const picpin * MGetPinsValues(void) override
board microcontroller get all pins list struct
Definition board_Breadboard.cc:912
unsigned int DBGGetRAMSize(void) override
board microcontroller get RAM memory size
Definition board_Breadboard.cc:1055
void MEraseFlash(void) override
board microcontroller erase flash memory (program)
Definition board_Breadboard.cc:774
void MSetPinDOV(int pin, unsigned char ovalue) override
board microcontroller set Default Open Value (external pull)
Definition board_Breadboard.cc:878
unsigned char * DBGGetID_p(void) override
board microcontroller get internal IDS memory pointer
Definition board_Breadboard.cc:1031
int DebugInit(int dtyppe) override
Start debug support.
Definition board_Breadboard.cc:642
std::string GetAboutInfo(void) override
Return the about information of part.
Definition board_Breadboard.h:47
float MGetInstClockFreq(void) override
board microcontroller get cpu internal clock (in PIC frequency/4)
Definition board_Breadboard.cc:831
void MSetFreq(float freq) override
board microcontroller set frequency
Definition board_Breadboard.cc:785
unsigned int DBGGetROMSize(void) override
board microcontroller get ROM (FLASH) memory size
Definition board_Breadboard.cc:1067
int CpuInitialized(void) override
return true if microcontroller is initialized
Definition board_Breadboard.cc:677
void MSetSerial(const char *port) override
Set serial port name to use.
Definition board_Breadboard.cc:689
float MGetFreq(void) override
board microcontroller get frequency
Definition board_Breadboard.cc:796
unsigned int DBGGetPC(void) override
board microcontroller get PC
Definition board_Breadboard.cc:969
void DebugLoop(void) override
debug step (pooling)
Definition board_Breadboard.cc:666
void EvKeyRelease(unsigned int key, unsigned int mask) override
Event on the board.
Definition board_Breadboard.cc:249
std::string GetName(void) override
Get board name registered in PICSimLab.
Definition board_Breadboard.h:46
unsigned int DBGGetEEPROM_Size(void) override
board microcontroller get data EEPROM memory size
Definition board_Breadboard.cc:1103
unsigned int DBGGetIDSize(void) override
board microcontroller get internal IDS memory size
Definition board_Breadboard.cc:1091
void Run_CPU(void) override
Paralle thread called ever 100ms to run cpu code.
Definition board_Breadboard.cc:423
void WritePreferences(void) override
Called to save board preferences in configuration file.
Definition board_Breadboard.cc:215
void MSetPin(int pin, unsigned char value) override
board microcontroller set digital pin
Definition board_Breadboard.cc:867
int GetUARTRX(const int uart_num) override
Return the UART N RX pin number.
Definition board_Breadboard.cc:1127
unsigned short GetInputId(char *name) override
return the input ids numbers of names used in input map
Definition board_Breadboard.cc:50
int GetDefaultClock(void) override
Get board default clock in MHz.
Definition board_Breadboard.cc:1115
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event on the board.
Definition board_Breadboard.cc:299
unsigned short GetOutputId(char *name) override
return the output ids numbers of names used in output map
Definition board_Breadboard.cc:66