Skip to content

Commit

Permalink
changed Dataline pullup resistor to external. Signal is more square
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinavA10 committed Jan 23, 2018
1 parent be41b3c commit 5ccb7b8
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 39 deletions.
2 changes: 1 addition & 1 deletion RCCar.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void initPorts(void) {
LATB = 0b00000000; // Clear Port B latches before configuring PORTB
ANSELB = 0b00000000; // Make all Port B pins digital, only RB4:5 can be set
TRISB = 0b10110000; // bits 0:3 are default cleared, set clockline as out. dataline, tiltswitches as inputs
WPUB = 0b10110000; //enable pins defined as inputs above, to all have internal pull-ups
WPUB = 0b10100000; //enable pins defined as inputs above, to all have internal pull-ups

LATC = 0b00000000; // Clear Port C latches before configuring PORTC
ANSELC = 0b00000000; // Make all Port C pins digital
Expand Down
22 changes: 14 additions & 8 deletions nbproject/Makefile-default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ ifeq ($(TYPE_IMAGE), DEBUG_RUN)
IMAGE_TYPE=debug
OUTPUT_SUFFIX=elf
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
endif

ifeq ($(COMPARE_BUILD), true)
Expand All @@ -44,6 +44,12 @@ else
COMPARISON_BUILD=
endif

ifdef SUB_IMAGE_ADDRESS

else
SUB_IMAGE_ADDRESS_COMMAND=
endif

# Object Directory
OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}

Expand Down Expand Up @@ -81,7 +87,7 @@ FIXDEPS=fixDeps
ifneq ($(INFORMATION_MESSAGE), )
@echo $(INFORMATION_MESSAGE)
endif
${MAKE} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
${MAKE} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${OUTPUT_SUFFIX}

MP_PROCESSOR_OPTION=16F1459
# ------------------------------------------------------------------------------------
Expand Down Expand Up @@ -147,15 +153,15 @@ endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.map -D__DEBUG=1 --debugger=none --double=24 --float=24 --rom=default,-0-C03 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=$(CND_CONF) --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0xC04 --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" $(COMPARISON_BUILD) --memorysummary dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -odist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.hex
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.map -D__DEBUG=1 --debugger=none --double=24 --float=24 --rom=default,-0-C03 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=$(CND_CONF) --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0xC04 --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" $(COMPARISON_BUILD) --memorysummary dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -odist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.hex

else
dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.map --double=24 --float=24 --rom=default,-0-C03 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=$(CND_CONF) --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0xC04 --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" $(COMPARISON_BUILD) --memorysummary dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -odist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.map --double=24 --float=24 --rom=default,-0-C03 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=$(CND_CONF) --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0xC04 --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" $(COMPARISON_BUILD) --memorysummary dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -odist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}

endif

Expand Down
12 changes: 6 additions & 6 deletions nbproject/Makefile-genesis.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
#Mon Jan 22 16:39:26 EST 2018
default.languagetoolchain.dir=C\:\\Program Files (x86)\\Microchip\\xc8\\v1.41\\bin
configurations-xml=2dd523457780ae3e3a3c655b38c012d2
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=c5846fdec3197dd1203fbded137f6478
default.languagetoolchain.version=1.41
#Tue Jan 23 15:34:00 EST 2018
default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc8\\v1.44\\bin
configurations-xml=7b101dae8c394b246a7d457a45ed114d
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5d30ff5128b14865c8a3796a8f0bb8a0
default.languagetoolchain.version=1.44
host.platform=windows
conf.ids=default
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=9c7431fa79cc2e2c2facfdb6b375cb88
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=1ecde863556371fa9144cadd16f678d4
2 changes: 1 addition & 1 deletion nbproject/Makefile-impl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}


# Project Name
PROJECTNAME=PS2-RC-Car.X
PROJECTNAME=PS2-RC-Car

# Active Configuration
DEFAULTCONF=default
Expand Down
20 changes: 10 additions & 10 deletions nbproject/Makefile-local-default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
#
SHELL=cmd.exe
PATH_TO_IDE_BIN=C:/Program Files (x86)/Microchip/MPLABX/v3.55/mplab_ide/platform/../mplab_ide/modules/../../bin/
PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/v4.05/mplab_ide/platform/../mplab_ide/modules/../../bin/
# Adding MPLAB X bin directory to path.
PATH:=C:/Program Files (x86)/Microchip/MPLABX/v3.55/mplab_ide/platform/../mplab_ide/modules/../../bin/:$(PATH)
PATH:=C:/Program Files/Microchip/MPLABX/v4.05/mplab_ide/platform/../mplab_ide/modules/../../bin/:$(PATH)
# Path to java used to run MPLAB X when this makefile was created
MP_JAVA_PATH="C:\Program Files (x86)\Microchip\MPLABX\v3.55\sys\java\jre1.8.0_91/bin/"
MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\v4.05\sys\java\jre1.8.0_144/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="C:\Program Files (x86)\Microchip\xc8\v1.41\bin\xc8.exe"
MP_CC="C:\Program Files\Microchip\xc8\v1.44\bin\xc8.exe"
# MP_CPPC is not defined
# MP_BC is not defined
MP_AS="C:\Program Files (x86)\Microchip\xc8\v1.41\bin\xc8.exe"
MP_LD="C:\Program Files (x86)\Microchip\xc8\v1.41\bin\xc8.exe"
MP_AS="C:\Program Files\Microchip\xc8\v1.44\bin\xc8.exe"
MP_LD="C:\Program Files\Microchip\xc8\v1.44\bin\xc8.exe"
# MP_AR is not defined
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files (x86)/Microchip/MPLABX/v3.55/mplab_ide/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="C:\Program Files (x86)\Microchip\xc8\v1.41\bin"
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/v4.05/mplab_ide/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="C:\Program Files\Microchip\xc8\v1.44\bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
MP_AS_DIR="C:\Program Files (x86)\Microchip\xc8\v1.41\bin"
MP_LD_DIR="C:\Program Files (x86)\Microchip\xc8\v1.41\bin"
MP_AS_DIR="C:\Program Files\Microchip\xc8\v1.44\bin"
MP_LD_DIR="C:\Program Files\Microchip\xc8\v1.44\bin"
# MP_AR_DIR is not defined
# MP_BC_DIR is not defined
8 changes: 4 additions & 4 deletions nbproject/Makefile-variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=PS2-RC-Car.X.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/PS2-RC-Car.X.production.hex
CND_ARTIFACT_NAME_default=PS2-RC-Car.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/PS2-RC-Car.production.hex
CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
CND_PACKAGE_NAME_default=ps2-rc-car.x.tar
CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/ps2-rc-car.x.tar
CND_PACKAGE_NAME_default=ps2-rc-car.tar
CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/ps2-rc-car.tar
12 changes: 6 additions & 6 deletions nbproject/Package-default.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ CND_CONF=default
CND_DISTDIR=dist
TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=PS2-RC-Car.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=ps2-rc-car.x/
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/PS2-RC-Car.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=PS2-RC-Car.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=ps2-rc-car/

# Functions
function checkReturnCode
Expand Down Expand Up @@ -57,15 +57,15 @@ mkdir -p ${TMPDIR}

# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/ps2-rc-car.x/bin
makeDirectory ${TMPDIR}/ps2-rc-car/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755


# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/package/ps2-rc-car.x.tar
rm -f ${CND_DISTDIR}/${CND_CONF}/package/ps2-rc-car.tar
cd ${TMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/ps2-rc-car.x.tar *
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/ps2-rc-car.tar *
checkReturnCode

# Cleanup
Expand Down
2 changes: 1 addition & 1 deletion nbproject/configurations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<targetPluginBoard></targetPluginBoard>
<platformTool>Simulator</platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>1.41</languageToolchainVersion>
<languageToolchainVersion>1.44</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<compileType>
Expand Down
2 changes: 1 addition & 1 deletion nbproject/private/configurations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir>C:\Program Files (x86)\Microchip\xc8\v1.41\bin</languageToolchainDir>
<languageToolchainDir>C:\Program Files\Microchip\xc8\v1.44\bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
Expand Down
2 changes: 1 addition & 1 deletion nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Users/Abhi/Documents/MPLAB/PS2-RC-Car.X/PS2RCCar.c</file>
<file>file:/H:/MPLAB/PS2-RC-Car/PS2RCCar.c</file>
</group>
</open-files>
</project-private>

0 comments on commit 5ccb7b8

Please sign in to comment.