Project Journal for Brandon
=============== Week 15: =================
Entry 2: ----------------------------------------------------------------
Date: April 24thStart Time: 10:00am
Duration: 17 hour
back
working in software logic again
created all the states
just gonna put all the state transitions within a bunch of conditions (if else if etc...) and let it sit in the while loop
we want the MCU to always monitor change in states
Stanley using my laptop to do keypad fingerprint stuff
Meanwhile I wrote this
just realized that i had press 1 for change fingerprint / key was the same so i just assigned # and * to both
nvm # is used to lock
we're gonna use 0 to change print
to change pass
to lock
i took a 30 min lunch break
now i am back
i transferred all state machine diagram from the board to teh code
here's a snipper example
there's a lot of pseudocode and syntax cause stanley is more familiar with keypad and fingerprint sensor
i wrote like the state transitions and stuff and what the LCD should display
so he's kinda jsut finalizing it and hopefully there's no issues
i now need to work on how to save these structs and values to flash memory so that upon loading, we can reuse the values instead of reverting to default ones
the goal is to save the array at the bottom if ever edited
otherwise we just use the default users struct
i think i have to edit the CHGPIN state such that we edit the users buffer
since we defined struct User users[3] already imma change the correspondance thing to users[current_user].password[count] and hopefully that works
okay so we are gonna have the simplest while loop of all time
we just want to do load users from flash right
and then
GOAL IS TO SAVE THIS TO THE FLASH
something i learned today is that flash memory needs to be erased before writing
those are the 2 functions that i need to get working
gonna find some resources and links to help me figure out where to store the address because obviously i can't store it where the code (instructions are)
ok so i'm gonna take a look at memory bank organization
we have stm32h7a3... how do i know which table to use
i think i'm actually supposed to use this documentation cause it's for stm32h7a3
flash memory bank maybe?
i will try to use the very last sector of the flash bank (flash bank memory 2)
i think the sector is 127
https://www.st.com/resource/en/reference_manual/rm0455-stm32h7a37b3-and-stm32h7b0-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
i'm referencing this file here to look at the memory map and stuff
here's how we're gonna test
we're gonna run it the first time right and it should just be default user data at first break point
once 2nd breakpoint is run
i unplug the USB
then i debug through the MCU again and see what we store
if we can load up the structs i set previously (as seen in the screenshot)
then we'll know that we have successfully stored the password
still have to integrate this with the rest of the software logic
but we want little by little components to come together
waiting for stanley to test his code (my guy came to lab straight from the hospital ;-;) and then i'll test mine
i really hope i don't break anything but i think our program is small enough such that it shouldn't use both banks of memory
the program starts at 0x800 0000 and the program is size less than like 53 kb so i don't think our data will mess with the because both flash memory banks are a 1 MB in size
still waiting
and stanley can't turn on the debug LEDs
:(
we can't even manually toggle them on
idk what's going on
i plugged programmer to my computer
i can turn on LEDs
good luck to stanley
so it seems the first 2 users are brought back from flash
which is actually super weird because
i changed those passwords AFTER running the debugger and i thought i saw the correct data
because before
THESE WERE THE PASSWRODS
should've taken a screenshot though cause i could've sworn i saw that
idk
i'm going insane
testing stanley's code right now
LOL IT WORKS
HIS DEBUGGER IS COOKED
i might've looked at the wrong memory organization cause i just realized there's a memory organization for STM32H7A3RGT6 and our MCU is STM32H7A3xG
i'm back
lemme try sector 63 instead of 127
same test as before
store to flash, load from it and see what we load up
just ran the code
debugging now and see which users we get
if this works, we are gonna ignore flash chips when we try usb communication
remember how i used arrays to store data
i wanna see if i can store that array the same way i store the array of structs
if it works then we'll have at least 4/5 psdrs for functional description
there's 8 * 64 KB per bank and i don't think code will leak from bank 1 to bank 2 so
wtf is this what is happening to the 3rd user
as well step through the code eventually the code will reset the list of users to default users
yeah and then
this is after the assignments in main
lemme see what's wrong with save users to flash
i can't step in...?
nvm now i can
wait
what if i tried to do 4 users
will it only truncate the last user or everyone after 3?
just ran the code
running debugger to see what we find
found a pattern
everyoen user 3 and onwards aren't saved
-1 and 255 are basically the reset values
in flash
so first 2 users are saved
everyone else aren't
lemme see what happens if i load from memory IMMEDIATELY AFTER saving the array of structs
i'm wasting so much time because the debugger always randomly stops from from stepping in / out
yeah ok immediately after i write my reads just see 2 missing users
uint8_t *flash_ptr = (uint8_t**)USER_FLASH_ADDR;
for (int i = 0; i < 32; ++i) {
printf("%02X ", flash_ptr[i]);
}
printf("\n");
i'm gonna try this
ignore the 2 stars
it's only 1 satr
star*
we are reading straight from memory
i can't print tho so
imma just not print
i'm just gonna do the for loop with nothing inside
gonna throw that in the main function as well
gonna step through this loop and see whatever
yeah the loop just freezes
having trouble iterating or something
trying bank 2 section 62 and beginning address of that section
i don't know what's going on
same thing
only first 2 users are getting stored
HUH????
whatever that's not the issue
what if i store 16 bytes at section 62 and 16 bytes at section 63
lemme first write in chunks of 16 bytes
jk
doing original idea
i was about to debug and see what we load
but since we wrote to 2 detached parts of memory
our load needs to do the same
we're gonna have 2 mem copies like this:
memcpy(&users[0], (void*)0x0817C000, 16);
memcpy(&users[2], (void*)0x0817E000, 16);
first 2 users loaded
ofc the debugger just stops
running again
LOADED UP
LOL
WTF
🤣
WHY DO THEY HAVE TO BE IN DIFFERENT PARTS OF MEMORY
COMMITTING CHANGES NOW
how the hell am i supposed to store data of 4 different users
in 4 different parts of main memory (flash)
IF I CAN'T EVEN STORE 32 BYTES OF DATA IN A SECTOR OF 8 KB
gg
maybe i can only store 16 bytes of data at a time? and not 32?
i really wanna try being able to store everything in a single sector so that if i wanna store 4 separate memory spaces for the 4 users
ALL IN ONE SECTOR
LET'S GO
note 16 bytes at a time
don't ask me why
this is purely from observation
ok setting up USB now
going to tutorial
basically what we're gonna do is
the methodology for loading and flash programming (storing) is what i'll use for usb reads and writes
gonna revisit the st tutorial i had a while ago rq
unable to complete formatting wtf
ðŸ˜
actually
so
i tried 2KB
4 KB
they didn't work
i upped the capacity to 32 KB
but imo that's WAY too much
cause the tutorial used 64 KB
iw anna try 8 KB
i hope that works
that's literally the size of the entire sector of the memory bank
i accidentally did 16 KB first
let's see what happens
NOOOOOO
16 KB TOO SMALL
ok
i'm thinking
we lie to the user
that they only can use 4 KB
so that we don't have to handle all 32 KB of data
;0
:)
ok
we are at this stage now
this is size of formatting
now i'm gonna use my MCU flash code
and integrate
there are 4 users
63 is used for storing user passwords
so 62 is for user 4
61 for user 3
60 for user 2
59 for user 1
if i can store the data for user 1
even after powering off usb
and we can still retrieve the data like i supposedly did when trying to store user passswords
i will call it
63 is 0817e000 to 0817ffff
that's 8192
gonna just do decimal
135782400 is 0817e000
135782400 - (63 - 59) * 8192 convert to hex
that's 0x08176000
wtf
shouldn't it be 0x08179000
nvm
ok yolo
these are my functions
only testing bank 59
YO WHAT
BUT WHEN I OPEN IT
HUH????
where is my txt
oh i didn't show but i made a txt file
it's gone now
takigna a break
idk wtf happeend
back
why isn't my code running AT ALL
we're running LCD code
ok i recloned into a new folder
i can run code now
the drive keeps like running out of space even though there's no files inside
i'm making sure i'm writing and reading from the right sector
i need to MAKE SURE i'm writing to the sector properly so that when i read from it there should be stuff there
ok maybe
i just have to write to a new sector
otherwise maybe windows gets mad when it sees that the remaining 32 kb isn't the same...? idfk
nothing is running
i'm going to restart (go back to the last commit where something was working)
i'm gonna make sure that when i go to the password loading again
that we actually load the password from memory
like the user stuff
i'm not even confident anymore
so i wanna see that
before i try to usb stuff
and maybe once stanley completes the state machine
i'll give him the flash code
and then he can try to store the passcodes and stuff
i learned from hal datasheet
at least if i want to start at sector 59
i can clear 59, 60, 61, and 62
this is easy
HAL datasheet
i can confirm here that (or at least reasonably assume) that i can memcpy as much memory as i want but for writes only 16 bytes at a time
maybe that's why 32 bytes failed last time?
stanley just left
so right now
imma just try to get the storage of user info working
took a 15 min break
after integrating with stanley's code
running into bug of default password 0 0 0 0 failing
i casted the default const User struct
let's see if that works
nope
wtf
OHHHH
I'M LOADING NON DEFAULT PASSWORDS
how interesting
we'll have to deliberately clear the section
wait that might be goated
hold up
imma change the password
and load it up
and see if it's saved
then imma power off
and redo without reprogramming
rn 0230 is pass for user 1
gonna change it to 0555
BANG UNLOCKED
CHANGING PASSWORD NOW
hmm the new password is incorrect...
i need to check why
lemme try old password
bruh what
ok imma run through debugger
WHY IS THE NEW PASSWORD ALL 0S
WHAT
ok well now imma see if i can change to 4555
i tried memcpy earlier but idk what happened
now i'm trying to just set the password in users array while the new one is being assigned
honestly
we know that we ourselves (in stanley's code) DO NOT preset the user passwords
it's in the flash
if i unplug
and say look at the password i previously set for user 2 (stored in flash)
and it works
imma assume it works
but rn the new store method isn't working
so we gotta see why with stanley's code i can't store new passwords
but hopefully my fix earlier did the trick
ok so i successfully changed password to 4555 (without unplugging usb)
unplugged usb and programmer
let's see what happens
will the new password work?
BANG
UNLOCKED
taking a break
i committed changes on stanley's computer
before he comes back
we power cycled
now imma test user 2's passcode
it should be what we stored
NOT DEFAULT
5008 is user 2 pass, 4555 is user 1 pass (if we ever get it wrong we can always look via debugger lol)
BANG
WORKS
USER 2 CAN AUTHENTICATE
WE CAN DEF ACCESS MCU FLASH EVEN AFTER POWER CYCLE
sorry it's like 4 am i'm super tired but i'm making progress
focusing only on usb <-> MCU flash now
wait rq
i changed user 2's pass
it's 2008
gonna go to lock state
enter user 2 pass
then power cycle
and test user 1 and user 2 pass
then i will move on
i'm gonna quick show the ST tutorial that made USB work
and then i'm gonna stop logging hours
and just watch stanley code
i can give him pointers but my original solution didn't work
and i'm really tired
where did the 20 KB go
back
gonna see if i can write 32 kb of normal array to MCU flash
and read it back
i have array [32 * 512]
gonna write a value to the first and last index
it'll be uint8_t
IF I CAN WRITE THE STUFF TO THE FLASH MEMORY OF THE MCU
AND IF I CAN RETRIEVE IT
WE ARE GOLDEN
this is going to be my test
i can't seem tow rite 32 KB to microcontroller flash memory
more than 1/2 of my values are missing
i am able to write 8 KB to a sector
can I try writinig these 4 8 KBs separately? basically writing all 4 equal partitions of 32 KB into flash?
i'm getting a hard fault...?
getting a hard fault for some reason
idk what's going on
can i try actually manually writing 32KB partitioned into 4 parts
i tried reducing the size more and more and it's not working
hard fault at 406
5096*
4096*
i give up
imma sleep til like before 8
i have class at 8:30
i'll see if i can figure this out later
Entry 2: ----------------------------------------------------------------
Date: April 23thStart Time: 8:30pm
Duration: 2 hour
i am starting the ABET report
abhijay is debugging the USB; MCU; USB but i'm not really doing much so i'm just gonna log stuff for ABET report
i've also been really back and forth between helping abhijay and abet report
i did help him realize that the block size he wants to use and the one set in the middleware don't match
that's why the USB in the file explorer of the host device doesn't respond
i already tried changing the parameters of the wrapper functions until we finally figured out the block size mis match being a key issue
it's still not fixed and i am now transitioning back to abet report
Started finishing software logic Merged Stanley’s keypad and fingerprint sensor code Working on just making sure all the software states are correct
did more research on usb i'll send pics later i'm super tired have to get to mechanic at 8 am bye
Entry 1: ----------------------------------------------------------------
Date: April 22thStart Time: 8:45pm
Duration: 0.5 hour
4/22/25 - 8:45 pm
started writing basic code for what the LCD is ACTUALLY supposed to display
i forgot how to move cursor to top line and bottom line so i will check the datasheet real quick; i’m trying to write the user select stuff on the screen (should I add a welcome screen on power up and ask user to continue? eh whatever i’ll just write user select)
home is where the default position of cursor would be (top left i think?)
yup
so second line would be 0xFE 0x45 0x40
not testing right now; just setting stuff up
tomorrow if i have time i will probably test
moving on i will ask for password
i would have to clear the screen and move cursor to top row again
oops i forgot to do * on second line
we will probably print a character each time a user enters a number on the keypad
but now that i think about it what if we add a choice for user to pick between password vs fingerprint
i will probably add that menu
i kinda had to abbreviate a lot but oh well
here's fingerprint choice
ignore the power up comment i just copied and pasted
gonna add authentication success now
kinda just churning this stuff out
my laptop is gonna die
pushign changes and then i’m going home
=============== Week 14: =================
Entry 2: ----------------------------------------------------------------
Date: April 18thStart Time: 2:20pm
Duration: 3 hour
- More Hardware Work
- i've been doing sidequests for the past hour so i am going to start looking into USB now
- i don't want something to happen to my laptop so i will probably just be doing all development on the desktop
- since we got LCD and flash ic and (soon to be) fingerprint psdrs checked off, i'm going to see what i can figure out regarding USB
- wait pause i'm doing errands i didn't start yet
- okay officially starting now ~ 2:20 PM
- i just realized my purdue account on the desktop computer at the lab station doesn't have any of the installed software i need so will probably just resort to video / other tutorials on the desktop and do software development and stuff on my laptop
- actually i can probably just do development on my laptop but the usb host will be the desktop
- first i'm going to identify the commits that abhijay wanted me to look at
- from my understanding, USB_Device, flash ic code, and potentially fatfs are the files i need to look at

- these are all his recent changes, but it seems to me that FATFS isn't something i need to immediately look at so i will pay attention to the USB_DEVICE and flash files for now
- i tried looking up application notes on the stm32h7 website but there's only one article about USB and i read through it but it wasn't very helpful: st.com/en/microcontrollers-microprocessors/stm32h7-series/documentation.html

- the issue is i'm not doing device firmware upgrade or working with bootloaders so i'm probably ignoring this technical note
- it would suck if it ended up providing useful information later but i don't see much help

- gonna look through this and see if there's anything helpful for setting up USB
- the goal is to look at all this tutorial stuff and if nothing is working THEN i will see what abhijay committed and try to "debug" those

- not one match for USB??? this has to be a joke

- wowo ok
- there are some youtube tutorials but we already tried going through phil's lab
- there's this video playlist that i ignored some time ago: https://www.youtube.com/watch?v=eNnInpdXorw&t=413s https://www.youtube.com/watch?v=I1HfAkz-brc&list=PLnMKNibPkDnFFRBVD206EfnnHhQZI4Hxa&index=8 looking through them now
- it seems as if the programming manuals won't giv eme much for usb related so
- by sheer chance before watching videos i looked at user manual and found this

- i wonder if i need to look at those files later?
- but the issue is the component files aren't supposed to be modified for the user
- maybe taking a look at them later can help answer some questions as to why the usb yields blank values and storage capacity?
- i can't actually find the project examples there unfortunately

- looking at the video, i'm trying to see if we ever use that function
- it is part of the USB training video
- it is unfortunately not in any of the USB_DEVICE files
- apparently if you want to transmit something you need to use that function??

- i found this function in the driver folder as well but i'm not sure if we need to use it
- it's not in the usb_device.c
- i'm just trying to understand the architecture of the USB software but i'm not finding anything super intriguing
- the only thing is potentially why we are not transmitting anything via USB back to the host

- yeah wait i think we need to use these functions right
- because if we're not transmitting anything to the host how will it know how to interact with our USB?
- ohhh i see we're a mass storage class
- that's for a communication device

- do we need this at all?

- if logical unit number isn't really used... especially since we are only communicating with the microcontroller, can i leave that code there?
- if it fails then i'll jsut hold the reset button and rerun the code without it

- yeah maybe idk
- ok no blue screen so far
- the desktop isn't reading the device though
- ok nvm after reopening file explorer it was fine
- lemme see what happens if i try to read the properties
- yeah that line didn't do anything
- still says used space and free space as 0 bytes
- here's a mass storage class video:

- link here: https://www.youtube.com/watch?v=GjQqZd1keBo&list=PLnMKNibPkDnFFRBVD206EfnnHhQZI4Hxa&index=16
- i'm definitely checking taht out next cause that's what we are making
- i think the previous usb training was just a high level overview with a block diagram showing that components involved in our USB firmware are application, device driver, hal driver code
- the only usb hal driver code i saw was the stm32h7xx_ll etc .c file

- ok here's the device structure for our purposes
- i didn't know pcd.c was a thing though so i'm going to check it out
- it's all like peripheral control and stuff but idk if i need to mess with that
- just gonna finish the video and see what happens
- i actually ran out of usb ports on my laptop so i'm gonna watch this video on my desktop but share my findings by following along on my laptop

- checking for this section in our code, maybe we can use it even though logical unit number tends to remain unused in our project
- yeah it's there

- even though our block size is 512 i probably need to check full capacity and change blk number
- nvm it's 2048 in our thing
- whatever imma keep watching the video and see what happens
- the video ignores the storage init fs functioin in the usbd_storage_if.c file
- k so in get capacity the values are hard coded in the video (assigned by the constants) so i will leave it similar to what abhijay already did and make no modifications here

- here instead of values, the video assigned block num and size to the predefined constants shown in the video
- ok so this is what i am messing with right




- not really much code but we're able to get this result on the desktop

- I clicked start and apparently disk would get erased but the ST tutorial did it anyway so I did too

- This is where I am now
- Not bad I guess?

- I don’t know what’s going on

- What happens if I unplug and replug?
- i have ejected
- what happens when i plug it back in?

- We are back to this again

- I bet my file will disappear
- Yeah it’s gone

- Am I able to change capacity at least?

- we should get half capacity

- BANG
- Gonna get this checked off because capacity is being communicated
- GOT IT CHECKED OFF
- i'm gonna demo fingerprint sensor real quick and then maybe i'll try to write the logic for the entire device
- THIS VIDEO IS AWESOME: https://www.youtube.com/watch?v=GjQqZd1keBo&list=PLnMKNibPkDnFFRBVD206EfnnHhQZI4Hxa&index=16
- pushing my changes right now
- theni have to switch branches and get stanley's code
- ok apparently i didn't even need to get that checked off
- whatever
- shivam appreciated the demo
- we already have 3 psdrs now so
- last thing i wanna work on (i don't think i got this to work in the past) is custom lcd strings

- this kind of code is bad practice if i want to print different things
- it will be easier for us to integrate if we can just do lcd_print(&hspi2, string1); lcd_print(&hspi2, string2); instead of just a bunch of different tx buffers that i have to define
- gonna try that now

- my C is a bit rusty but hopefully that's equivalent to the code above with the exception that this string will include a null terminator
- wait i can just do sizeof - 1 to exclude the null terminator
- let's add this to the .h and see if we can call from main

- debugging why i only get 3 letters here

- same result but the warning is gone
- i just casted the string as uint8_t*
- should i try strlen instead? sending only 3 characters makes no sense

- i'll try strlen after this fails
- damn ok
- i'll try strlen
- nothing gets displayed now

- done

- clocking out now
- will working software state machine and transitions on monday or something
- big progress made today!
- good friday!
Entry 2: ----------------------------------------------------------------
Date: April 16thStart Time: 12:30pm
Duration: 2.5 hour
- More Hardware Work
- Man lab day, attending Phil Walter meeting
- Today is the last man lab
- Need to get everything done by next Friday
- Final demo = everything packaged and integrated
- This Friday is last week for SPARK registration
- resetting stm32cube ide workspace so that i can get the psdr checked off for the lcd code
- Realized I have to wait for heat shrinks and Abhijay has had it with USB so I’m gonna watch him while I wait since I don’t wanna test the external components

- Abhijay will heat up the heat shrink and I put electrical tape
- we got access to heat gun so after heating up heat shrink for lcd i'm gonna test my code

- We can display text but WHERE IS THE BACKLIGHT???

- i'm not even supposed to est it because the default level is 8

- Welp I added the brightness code anyway and now it works

- yay

- I changed the brightness

- note that LCD light was originally passing in 0x8
- i'm still kinda confused because originally without LCD light the screen was off
- i thought i had code actively turning it off but
- after rerunning with new brightness
- it simply dimmed
- so idk why 0x8 brightness was preserved before the lcd_light(&hspi2, 0x4) line of code ran
- i am now waiting for TA to check off lcd psdr
- yay checked off
- time to crimp another wire to help out my boy stanley

- Bang crimped
- Waiting for Stanley to crimp the other end and then I will solder the wires together

- Soldered, applying heat gun now


- Done
- gonna try to tackle USB next cause Abhijay needs a break
Entry 2: ----------------------------------------------------------------
Date: April 15thStart Time: 8:20pm
Duration: 1.5 hour
- More Hardware Work
- Gonna solder em together (image from yesterday)

- I am basically tangling the wires

- Then I place solder iron under the wires, solder on top and move along the wires to solder the whole thing
- There’s a heat shrink to the side but I won’t hear it up yet in case there’s an incorrect solder

- With a slight tug, the wires don’t come apart
- I will now move on the the next wires

- I always add a heat shrink before soldering the wires for ease of attachment later
- This process is repeated for the remaining 8 wires (including the one I’m holding) for the LCD
- Everything is connected
- I am now repeating the same setup but for the keypad wires
- I don’t want to get the keypad wires’ direction wrong so I want to make sure that I look at Abhijay’s KiCad and keypad data sheet
- I think we should’ve labeled one pin for the keypad like we did for the MCU but oh well
- I don’t have my laptop on me because I drove to lab straight from Walmart so I’m waiting for Abhijay to finish something

- To make things easier for me I already stripped one wire for keypad
- Now that I lined it up with Abhijay’s diagram (he pulled it up)
- I can start soldering wires again and repeat same process as before
- Here we go

- All done

- I’ll let Stanley take a look tomorrow and then we’ll do the heat shrink
Entry 1: ----------------------------------------------------------------
Date: April 14thStart Time: 4:40pm
Duration: 2.5 hour
- Hardware Work
- Arrived at 4:40, Stanley was able to consider soldering the remaining blue wires
- I’m gonna solder the wires of that to the 28 size wires together
- Actually before that the ESD and connector will need to be soldered


- Soldering complete
- Gonna move on to help Stanley with the wires

- I’m just following the same steps as my video tutorial from last time
- This is for the fingerprint sensor and according to Stanley we only have one wire to go
- Done

- Stanley and I are now going to solder the blue wires to the white wires

- He’s showing me an example on how to do the first one and then I will take over on some

- My patience has worn thin so I tired it out, Stanley gave it a tug but I’m not sure if the wires are securely soldered
- I’m gonna do the rest of the crimp terminals now
- Cause Stanley is more experienced soldering wires
- I gave it a go tho!
- LCD wiring done

- Doing one more set for the keypad

- Keypad wires are done
- CLock out 7:10
- gonna solder wires tomorrow

=============== Week 13: =================
Entry 4: ----------------------------------------------------------------
Date: April 10thStart Time: 3:00pm
Duration: 1.5 hour
- Wire Crimping & Lab Work
- i just got out of my ece 568 meeting so i will hang out at ece 477 lab section for a bit
- i'm trying to see if i can stick the 28 stranded wire by only crimping the conductive part and not the insulative part
- i broke the terminal while crimping, going to try again
- okay i stuck the new terminal in but i don't think it's actually supposed to fit, i'm going to try to put another terminal adjacent to this one
- okay i broke that wire it literally snapped off
- it's already been 50 minutes :(
- okay stanley recommended i try a smaller wire of maybe size 30 but the one i found near our lab bench is a solid wire so when i do wire stripping i have to make sure i use the right side
- okay i personally like the solid wire a lot better because it's more obvious whether or not it is in the right spot before i crimp it
- okay the crimp was super successful now let's see if i can stick it in
- dang this concentration really takes A WHILE
- okay it went inside the terminal super well let's see if i can put an adjacent one
- BANG THIS IS SO CLEAN

- i'm going to make a horrible video tutorial on how i did it (it's mostly for me to remember what i did)
- calling it at 4:30
- just gotta crimp the remaining wires and then solder the 28 and 30 size wires together next time
Entry 3: ----------------------------------------------------------------
Date: April 9thStart Time: 12:30pm
Duration: 3 hour
- man lab day
- phil walter talked about the need to get going with assembly and integration because final presentation is in 2 weeks (Friday)
- priority is getting PSDRs checked off
- abhijay showed me the error code that caused my laptop to blue-screen when connecting the USB and there was a kernel error: KERNEL_MODE_HEAP_CORRUPTION
- after a quick google search, all the search results are giving me game-related issues (ie. valorant etc)

- i revisited the video and saw that I can look up this stop code on windows.com but after visiting the site it didn't give me much to work with
- meanwhile, abhijay made a lot more progress on flash ic and he's not getting any issues with USB (although the driver i wrote isn't in his branch so i don't know what exactly i did wrong)
- i would say google's ai gave me a better understanding of what is happening:

- and since i'm pretty sure my laptop doesn't have issues, i bet the usb driver i wrote is the cause of the issue since i wrote an arbitrary available amount of memory even though there is none, so i wonder what would happen if the microcontroller told the host computer that there is no memory available
- abhijay is still programming more flash ic stuff so i'm going to try to do the wire crimping for the REALLY SMALL WIRES
- i finally got one wire to be firmly attached to the crimp terminal
- i am now looking up how to plug the terminal into the connector
- stanley left and since abhijay is still here i might as well get more soldering done with him
- this is our setup (after completion)

- we basically just soldered on more capacitors and resistors and some connection headers
- gonna call it at 3:30 after soldering more components
Entry 2: ----------------------------------------------------------------
Date: April 8thStart Time: 3:50pm
Duration: 3 hour
- Mandatory Lab today
- stanley is showing me how he is putting the connectors together because i am curious about how he's making the connector work
- he first removes some crimp terminal and then he is thinning it out by what i assume is he's just snapping something off on both sides of the middle
- there is a spring (small thing sticking out) and that is NOT to be messed with
- he then sticks the exposed end of a wire and ensures it's the same length as the middle part of the crimp terminal that he shaved
- he then sort of crimping the terminal using the 1.4 mm size (crushing it a little) the outside valley or spring are not crimped
- he finally puts exposed end of wire into middle area (area to be crushed) and he crimps it together
- if the spring is messed up, the wire will not hold in there
- the spring will be on the same side as the hole so that it can lodge the wire in there
- i am now resuming stm32cube usb progress
- i think i'm at a halting point for usb (although i can write general logic and wrapper code) but i will need to wait for abhijay to make more progress on the flash ic or i can write something myself while he's not there
- stanley just gave me an idea where instead of reading flash ic capacity, i can just send the size of an array that can be manipulated (although not feasibly manipulated) via USB
- i actually initially wrote an empty usb.c and usb.h file but according to this tutorial (which i was supposed to follow a long time ago) i can just manipulate the USB_DEVICE files i looked at yesterday
- here is the arbitrary capacity that I will give to the host device via USB

- the programmer of the stm32h7 is currently busy with abhijay's work so i will try to help stanley work on the connectors
- i'm also soldering on all the components for the fingerprint sensor, header and esd protection diodes + resistor
- ok back to USB stuff, i tried plugging the programmer and actual PCB to my laptop and I saw USB E Drive with unspecified file format which I haven't configured yet but then my computer got an error and needed to immediately restart
- i will try to do file format specification real quick
- actually the video did file format AFTERWARDS so i'm gonna see if I can just plug stuff in and see if I can get the file capacity
- ok i'm gonna walk you through what is going on

- yellow is my computer storage, red circled is the programmer, let's connect the PCB and hope that we don't get an error again
- how am i supposed to debug this...?
- i have an idea... i will not connect the USB to my laptop (the one connected to the PCB) - actually stanley recommended this and then i will just power the pcb via the programmer
- gonna end it here at 6:50 but I hope I resolve the issue somehow i might have to rewatch the tutorial again
Entry 1: ----------------------------------------------------------------
Date: April 7thStart Time: 6:30pm
Duration: 1.5 hour
- Said Hi to Abhijay and Stanley
- just got to lab, abhijay updated me on the JEDEC working on the flash ic
- i am going to reread the datasheet again because it seems like the writes never worked; right now abhijay is just hoping that the chips on board can work better than the prototyping flash ics we used
- he ran the code and is oping the debug LEDs alternate (resulting in all flash ICs sending the JEDEC ID)
- I will probably be doing pair programming with Abhijay since his branch and everything is loaded up already
- abhijay went through all the refactoring he did to the codebase
- turns out the writes work (at least writing to the registers) even though the prototyping setup did not work
- we are probably going to blame the noise which was a recommendation made by stanley
- i guess this means all the code we wrote in the past was just fine (... maybe)
- below is the code that was adjusted by abhijay after i last touched it
- abhijay has pushed the code and now i am going to add data manipulation code to the flash ic refactored branch because that is what we need to read and store
- after writing write enable code abhijay kicked off the flash ic responsibility and i'm back to resuming USB work
- ngl he asked me to do the flash ic but i guess he got emotionally attached to the component so yeah that's why i'm doing USB
- i'm revisiting the tutorial i looked at last time: https://www.youtube.com/watch?v=aEwwQMdKd-c
- here's the files i'm analyzing before i make any edits

- pause at 8:00, continue USB tomorrow
=============== Week 12: =================
Entry 3: ----------------------------------------------------------------
Date: April 4thStart Time: 4:30pm
Duration: 2 hour
- Personal Workday + Abhijay
- needed a late day on OS but after finishing it and taking a break i got to lab with abhijay
- we are probably gonna try to solder some more components and get some PSDRs checked off
- we were going to do the connectors for the LCD and keypad but apparently it's complicated and we need Stanley's help for that
- abhijay and i decided to try to solder the flash ics and try to program them and get the jedec ID and flash some LEDs of the received jedec ID matches
- i used the same trick as wednesday (for soldering the caps) to remove a conservative amount of solder to put on the right amount for the flash ics because the pins are kinda close together
- once again, i put solder on one pin, abhijay aligns the flash ics with tweezers, and i solder the remainder of the pins
- after doing so (abhijay removed excess flux), he tried to program the MCU but he still had the STM32F4 code and it didn't seem to work with the H7 chip as none of the LEDs flashed
- we decided to just solder on the USB ESD protection and I basically used the same trick as the flash ics except i was SUPER conservative with the amount of solder I used and just tapped the pins with my solder iron and the solder would magically connect the pins
- here is the result of both flash ics (IC1 to IC4) and the diode (IC6) soldered on

Entry 2: ----------------------------------------------------------------
Date: April 2ndStart Time: 12:30pm
Duration: 3 hour
- Mandatory Lab today
- attended phil walter meeting today
- phil walter emphasized the importance of integration and testing since we only have like 3-4 weeks left before we present
- we can try to get components to individually work on the PCB to pass ABET requirements
- i'm gonna solder on the MCU with my drag soldering techniques because I learned it from my workshop
- i repeated the steps I practiced with a TA and here is the result

- i had some bridges every now and then and the ways to handle them were to either push the solder inwards with the iron (if there wasn't too much)
- if there was too much i had to use a copper braid to remove excess solder
- after abhijay verified all the pins with the multimeter and we took turn soldering the pins of the programming header, i wrote some starter code to verify that the MCU can be programmed

- the code works!!
- after man lab ended i stayed behind with abhijay to add the decoupling caps on the back of the MCU

- i'm on the very conservative end for the amount of the solder i use and the technique is i pull the solder iron back as soon as i see a little bit melt
- abhijay and i put the caps on by first letting me put solder on one end, then he uses tweezers to align the cap, and then I solder the other end
- my OS lab is due tomorrow but the next chance I get I might come in and solder more stuff
Entry 1: ----------------------------------------------------------------
Date: April 1stStart Time: 7:30pm
Duration: 0.5 hour
- Said Hi to Abhijay and Stanley
- just got out of OS (ECE 46900 office hours)
- came over to the lab because i know abhijay and stanley are there
- they have 2 PCBs; one not having the oscillator because they soldered on other components first and one that had oscillator hot plated and then later other components
- on the board without an oscillator, i practiced putting an MCU on the PCB with the help of a TA
- i remembered the process, flux on one of 4 sides, add some solder there, then align MCU and then secure that same side with a bit more solder
- drag solder all sides and that's it; here's the board I used (edit on 8:37 PM 4/4/2025 when moving stuff to my journal i took the wrong photo)

- as you can see i soldered on (pretend it's there) the MCU (labeled in blue) - 4/4/2025 edit
=============== Week 11: =================
Entry 2: ----------------------------------------------------------------
Date: March 27thStart Time: 2:30pm
Duration: 5.5 hour
- Personal Workday + Abhijay
- 2:30 3/27/2025
- i just noticed from a screenshot i put in my journal that i am sending 8 bytes of dummy clocks
- right now the receive buffer shows all 0s, so what if I make another 8 index receive buffer? surely the data will eventually be in there...?
- wait... i did that already though darn
- i'm still just getting all 0s

- i want to check the oscilloscope again
- finally got a good view

- i hit default and then moved all the GND offsets down
- originally commented out the dummy clock stuff and only had flash read jedec id and yes that's 9F
- let's try adding back the transmit receive and see what happens
- that didn't work my MOSI is just high the whole time
- idk why MOSI just high though let me remove the dummy clock code again
- oh I see I think it's because of the reset code that shows up first, being FF but then i'm not sure how i was able to see 9F earlier
- ok i just resolved that the MOSI is high the whole time for reset which is FF but since we loop the flash_read_jedec_id command I can just hit single on the scope and see the 9F let me add back the dummy clock stuff again
- ok but now the slave isn't responding; technically i don't want the clocks to stop so what if I did a transmit receive where we do like 5 bytes where 1st byte is command, 2nd is dummy, 3rd 4th and 5th are for slave to respond
- actually let me see if i'm doing the dummy clocks properly; also seems like the noise isn't noise but an unitialized buffer being unexpected values
- okay so master line cs and clock lines are there but slaves lines aren't
- I tried a HAL Transmit Receive and i'm running into the same issue where the slave just isn't responding at all
- it was suggested by these websites: https://stackoverflow.com/questions/67922914/stm32-spi-communication-with-hal https://community.st.com/t5/stm32-mcus-products/what-is-hal-spi-transmitreceive-purpose-and-how-it-works/td-p/337551 https://stackoverflow.com/questions/67922914/stm32-spi-communication-with-hal
- going to check pinout one last time
- yes pinout is correct, still unsure why slave isn't responding
- ok i think my hold pin was disconnected because I think it works now after reconnecting it which makes sense because if hold pin isn't high, slave will ignore the master

- HAL Transmit Receive is definitely a lot cleaner i followed some guidance online
- committing changes now just to store working version
- running debugger to see if master can read
- OH MY GOD
- MASTER CAN READ ADN THERE'S LIKE NO NOISE

- i think it's because of hal transmit receive
- i accidentally skipped lecture I just realized
- 5:10 gonna take a break - 2.5 hours
- 7:30
- came back and tried to practice soldering
- whole tutorial going on where the TA first applied flux and solder on one edge, put the microchip on and put the solder iron on that edge so that the chip would stay attached to the board
- then took flux, applied it on different edge, took solder and applied it at a corner and just dragged the solder across all the pins
- for solder shorting pins, TA added flux and just pushed the solder iron against the pins and the solder disappeared
- if way too much, put copper wire on the extremely excess solder and then put solder iron on it so that the solder flows to the copper
- i then tried it myself and asked the TA for some help but other than that I think I am slowly getting the hang of it
- now i am going to help Abhijay with flash ic because i spearheaded the read jedec and could use the debugger so i'm helping him out
- he's trying to figure out why his receive buffer is just all 0s
- i showed him how to properly use hal spi transmitreceive because hal transmit receive is the size of the ENTIRE transaction (number of bytes sent & received) and he's working with 3 bytes, 2 transmitted and one read)
- he is able to read status register now :)

- gonna do the participation quiz real quick
- just finished the quiz
- helping abhijay debug
- for some reason, he's writing to an address and when reading, the value he wrote isn't there (he's doing write and read status register)
- basically in the previous screenshot, after a write to a status register, instead of reading a value, the RX buffer is entirely 0s
- he tried to see if he accidentally wrote to the wrong bits, but things should be fine.
- i wonder if this is due to the write protect pin that we haven't used yet; after all, we've only done successful reads. he just left, but i'm gonna see if write protect (messing with it) does the trick.
- that didn't work. we are still reading 0 in the read buffer after our write (we want to see 0x78)
- i saw a write enable function but i'm not sure if that's for writing to registers or pages; gonna send a write enable and see what happens
- nothing happened, but after commenting it out, i am reading this section that says "write access to status register is controlled by SRP0, SRP1, write enable, etc.

- not sure; gonna try to write the same value that we read from status register to see what happens
- wow; the read buffer is still reading 0. not sure what's going on.
- calling it a night at 10:17
- i'm gonna put together my journal tomorrow but i'm not gonna record the hours because i don't think it counts
- i think i need to grind out USB this weekend but stanley gave me like a youtube tutorial so hopefully i can get that to work
- this weekend will be pretty hectic because 568 lab and 469 labs are due next week
Entry 1: ----------------------------------------------------------------
Date: March 26thStart Time: 12:30pm
Duration: 2 hour
- Mandatory Lab today
- attended phil walter meeting today
- phil walter talked about how we should learn how to solder components on our board and use the practice chips and boards to do so
- most of our teammates are sick this week so I don't know how much we will get done as a group
- debugging abhijay's code to see if mcu properly receiving because he wants me to get MISO to officially work such that he can add stuff to Flash IC code
- unfortunately after looking at the buffer for the debugger but it's just showing a random value
- i'm gonna set a break point to after the receive and then see if i can get the last byte correct since the buffer can only hold one byte
- turns out buffer just shows address but the values are wrong
- we considered the issue being the clock rate being off, but that shouldn't be an issue considering the fact that the slave was able to read our command given the clock rate that we used
- I might try to make a larger buffer and see if we can "concatenate" to it but I don't know if that will work
- i just realized that it might be how i'm doing the dummy clocks because everything is super spaced out
- i'm gonna try using multiple buffers in HAL Transmit Receive even though i just used a singular one to get read jedec working in the past

- that didn't work and the scope looks disgusting
- i think i can get this working tomorrow because i got read jedec to work in the past, just didn't confirm whether or not master could read the data
Project Journal for Brandon
=============== Week 9: =================
Entry 3: ----------------------------------------------------------------
Date: March 1t4hStart Time: 2:30am
Duration: 2 hour
- personal workday at home
- one of the things phil walter mentioned was the need to add ESD protection to our keypad signals and fingerprint sensor signals
- i want to go sleep but i am doing that now because the PCB needs to be ordered tomorrow (aka later today on Friday)
- there are 2 ESD protection circuits mainly, dual schottkey and the TVS on Phil Walter's slides from week 6
- i'm not sure what to do about the stuff internal to the IC so i'm gonna ask abhijay if i needed to add those
- he said no, so now i am simply going to check whether to use dual schottkey diode or TVS (using part BZX84Cxx)
- these are the circuits that I am considering


- here is one link i am using to help me consider: https://www.microtype.io/esd-protection-circuit/#:~:text=Another%20interesting%20ESD%20protection%20circuit,the%20positive%20rail%2C%20not%20ground.
- according to the summary, things like touchpads (i will throw keypad in the same category) a TVS is suggested

- i learned that tvs is safer for higher voltage spikes compared to dual schottkey from human touch
- another google search helped me determine that human touches can reach kV magnitude, so that reinforced my decision to pick tvs

- after picking a single diode and resistor as my ESD protection circuit, I duplicated this in the schematic to change the new wiring (img below is just an example)

- i then got this really annoying rats nest so I decided to first split everything up in resistor + diode so I can see what needs to go where

- doing the UX TX (J1) was easy because there was so much room

- the keypad (J5) however i'm not sure because there's already resistors but i don't know if they're part of the keypad signal or the ESD protection circuit, and it's super cramped as well
- i will add the extra 220 ohm resistor + the necessary diode and if the resistor is extra then my teammates can probably fix it while i'm on my flight tomorrow
- here is my added fixes to the keypad, which honestly looks gross but just in case we need both resistors in addition to the diode

- today is manlab day
- attended phil walter meeting and we need to order PCBs today and verify footprints today
- we need to have been done with prototyping already so we're kinda behind and need to get going on usb and flash ic
- fixed gantt chart by putting a break on week 10 and making sure nothing is to be done on week 16
- verifying PCB changes that Abhijay did last night with Stanley
- notes for changes, GND is fixed for decoupling capacitor
- routes were redone so no acute angles
- removed vias for spi
- 5v+ going around
- removed usb signals from debug header

- we need to moat around clock
- bigger 3.3 V LDO pad
- big ground via
- fix acute angles
- add ESD for keypad and fingerprint sensor
- we want to do footprint verification so we are going to start with a checklist and see what parts we have
- what do we have?
- NOTHING LMAOO
- so we need to get (essential) MCU, flash chip, reset button, esd protection chip, ldo, usb female connector,
- non essential: 6 pin debugger header, programming header, lcd header, keypad header, fingerprint sensor header
- now that we've established the checklist for parts we need for footprint verification, stanley and i are going over some minor fixes on the board
- we probably cannot physically do the footprint verification so we will probably just verify it on kicad or something
- now I am helping Joshua setup stm32cube ide because he is also supposed to work on USB
- he's good now
- looking into usb and how to program it because the host initiates the transaction
- but before that, i am going over commit etiquette with Joshua because one of his commit messages is "changes"
- i have an OS exam tomorrow so I will end it here at 2:30
- work day with Stanley today
- i'm still figuring out my kicad issues because i had 9.0 version so i'm figuring out downgrade. i'll do that later but i want to explore the stm32h7 (i think f4 has the driver too) for USB because that's one of our main PDSRs that must be done alongside PCB finalization
- i'm going to take a look at the ioc file (stm32cube UI) to see if I can even edit anything
- after pulling from main to get the most up to date files, i just remembered that stanley merged a bunch of stuff and i can only hope that NOTHING is broken.
- right now, i need to figure out the pins for f4 (i don't think it's different from h7 but i'm checking pinouts just in case)
- i can't load the ioc for some reason... going to task manager kill it

- ok it's back. i see a USB_OTG_FS option for connectivity in ioc file but i'm gonna look up a tutorial
- this is the USB tutorial I am looking at and there is a ton of information: https://wiki.st.com/stm32mcu/wiki/Introduction_to_USB_with_STM32#Getting_started_with_STM32_and_USB
- i am going through some articles now and see which one stands out to me at first glance, then i will indicate which ones i should try to fully digest
- one thing is for certain, the computer is the host and the MCU is the device, so i will be ignoring the entirety of section 6 for now
- section 5 is what i think will be useful because it's related to USB device configuration
- sections 1 - 4 look introductory, so i will be scanning through them
- here are some keywords - host = root hub and function = device
- according to the stm32 wiki, hosts query all hub ports and if a device is attached, the host will enable the port and send a unique address to the device; this sounds like our MCU
- will have to receive an address from the host before anything happens
- it also sounds like the MCU in this case is the slave, which makes sense. the host computer will always initiate the transfer, so it sounds like the USB device end will have to just be constantly polling a receive if it is powered on and connected.
- i also see that the master will always send a token to start a transaction, so it's important for the MCU to be listening for this as well
- that is what i learned from section 1.
- i will now begin going over section 2
- the section begins with some diagrams regarding how STM32 positions itself in USB communication, and I could immediately tell that this is the diagram that I will use to represent the system of our project

- the end of section 2 concludes with some direction describing where to find code for the USB, which i will investigate once I finish readings sections 3 and 4. i will pair my reading of section 5 along with the code that I find
- section 3 is LONG USB playlist https://www.youtube.com/playlist?list=PLnMKNibPkDnFFRBVD206EfnnHhQZI4Hxa
- i will watch the first few short videos and determine whether or not i need to keep watching the rest
- sounds like a bunch of stuff about labs which i may not have time for; i will probably skip section 3
- section 4 is just this table indicating what MCU can do what for USB


- i will now find the code (image shown above) and take a look; one could look at this HAL driver as well: https://github.com/STMicroelectronics/stm32f4xx-hal-driver/blob/master/Src/stm32f4xx_ll_usb.c
- if you click "USB Device Library Overview" at the bottom of section 2, you're not taking to a new page; you're just taken to section 5 of the same webpage. it doesn't scroll for you though, so one may think that it just brings you back to the home page which it isn't trying to
- i can't actually find the source code which is supposedly found in project folder and middleware folder instructed here though

- i need to go to Walmart to get water so i will end it here at 4:50
- presentation prep!
- arrived at lab (first one here of my group tho there's someone else here not in my group)
- abhijay updated kicad so that Joshua could make a better mechanical design
- gonna re upload kicad files now
- then review the overview files including but maybe not limited to a3, a4, a5, a6, and a8 with abhijay

- i just reuploaded the zip file for kicad files
- abhijay isn't here yet, so i am just going to spend some time practicing and knowing how to concisely deliver my slides: LCD screen slide, keypad slide, state machine, lcd prototyping demo, flash ic demo progress, software development status, and gantt chart
- i'm mostly just going to write speaker notes and then practice delivering them well
- stopped at 4pm
- personal work day today + other people around
- i am adding content to the slides; not much thought just moving information to presentation
- i will explain gantt chart thought process;
- here's what we need to do left: flash ic firmware (only some aspects are tested) and we wanna get that done asap, same with USB firmware
- because lcd and other components are tested already, it's time to develop a reasonable state machine so that the tested components can have software logic added to them
- once all components have proper logic in accordance with state machine via like testing and stuff, pcbs may not be here yet so mechanical design needs to be done asap
- once pcbs arrive, we can do full integration and any debugging needed
- once our basic project is done, only then should we even attempt stretch goals

- 4 pm
- finished adding my slides
- I've kinda just been in lab watching people and helping a little bit when needed throughout the day but i'm not logging those hours because it's mostly been small bursts of work that didn't do too much
- i will start logging again now at 11:30 PM of 3/6 because i am working with stanley to go through parts of the website and make sure that everything is up to date
- we are going to go over all the datasheets to make sure they reflect the current products we are interfacing with and planning to use on the PCB (or contain code that we reference or take inspiration from)
- abhijay has the most up to date pcb and schematic (after i routed last night, he rerouted everything again) but he's nowhere to be found right now (11:39) and he needs to upload them to the website - he's back at 11:43 - working to upload right now as i check to see i have all the right files
- i'm walking through bill of materials sheet with stanley as he swaps in components that we are currently using
- digikey forces you to buy flash ics in bulk but we only need 4 so we are switching vendor to mouser
- i am looking up supplier for the Newhaven display that i worked with
- gonna clock out for now and reupload newest updated kicad files tomorrow and run through more A# documents
- 12:15 am done
- grind day today
- we are going to finalize the PCB before our design review; watching some videos for routing and stuff really quick: https://www.youtube.com/watch?v=iKfWoDcxpL4&list=PLUOaI24LpvQPls1Ru_qECJrENwzD7XImd&index=7
- got a refresher on vias and the need to look at pcb capabilities (text width etc) when finishing up the PCB
- i learned that if there are components on the board, turning off through hole models on the right panel will show the board itself without any components
- note that wires with higher width indicate that it can handle more current
- I am going to work on the slides while I wait for Abhijay to get here - Joshua is still setting them up so i will revert to the flash ic but i have to resolve merge conflicts :(
- i don't know what I did differently than before (didn't change wiring, didn't change code besides ensuring a reset before sending any other commands) and now I am able to get JEDEC ID after sending command and retrieving data via MOSI line

- if i didnt' mention previously, one thing I did do differently was toggle PC6 which is the HOLD pin that i have to interact with because if not done properly, the flash ic will disregard everything

- the TransmitReceive is to send dummy bits and receive, and even tho i get the JEDEC ID response, the master (stm32) is super noisy


- i'm going to call it here for now for the slave because even tho master is super noisy or whatever (due to code possibly?) at least we know flash ic can respond and i'm using standard SPI not Quad; right now MCU isn't actively reading the data; just calling it after seeing the signals on the bus via oscilloscope as seen in images above
- i'm going back to work on the slides, mostly adding content we have on our website and stuff
- when abhijay shows up i will work on pcb stuff with him
- break at 2:55 - i got really thirsty so i went to my apartment
- resume 3:10
- abhijay was having trouble putting the VBAT capacitors in a good spot and drawing a ground plane to ground them all; he initially moved all the capacitors on the other side of the board (within the area of where the microcontroller is on one side). i suggested he rotate all the caps in such a way that the ground points in the center as shown in the image below

- right now abhijay is trying to rewire the flash ics and i don't have a picture but he initially wired a pin in such a way that it blocked off other pins so i told him to either pick a direction or via
- most of this session abhijay is wiring the pcb (he has better technological capabilities apparently so he's doing it at home and we're just in a discord call) and i'm giving him pointers or wiring stuff which is all super in the moment stuff and it's all kind of just like piecing together a puzzle so i don't exactly know what to say in this journal; we did agree on certain signals being together ie. MISO MOSI SCK for the flash ics because these won't matter unless the right /CS is enabled.
- my turn to do some wiring now while abhijay takes a break
- the green path is what i just wired, but then I realized that it will be hard to wire the other pins as well
- I decided to pull the vias farther out so that the pins have room to wire out and go to their own vias
- wired PC2, PC3, for now
- then PC0, PA14, PA13, PC10
- routed PD2, PB13, PC0 on touch (wiring may change since we are switching components last minute)
- i am taking a break too at 5:41 because my eyes are super tired
- will come back after i eat dinner
- back at 8:15
- i tried routing one of the test pins (not a test point) and this looks AWFUL; it's a debug pin and the path is in green and i honestly worry that I am making things harder for abhijay but we will see; i need to see how this affects all the other components we haven't wired yet.

- abhijay recommended i move debug header to the bottom and i agree; slightly less overlap and routes look nicer
- we're deciding to leave power, gnd, and test points for tomorrow. these are the remaining parts i need to route on the right
- i need to see where i can find space; i first test by starting a route (but not completing it, just to see where the wire needs to end because it's highlighted and easier for me to see)

- sure, i can use rats nest but it's harder to see, i prefer highlighted form
- i found some room for the vbat and led1 since i can lay them on top of the blue wires (other side of board) and make sure they're close to the pins
- for the other led2, it's on the other side of the MCU (left side) so I'm moving it there and just making a bunch of space for vias

- actually, i might just find a better space but i need to ask abhijay (my kicad schm is broken) if debug pin is flexible or not
- for the green vbats remaining, i might just move them near the vbats and we'll go from there just because there's space and there's already another vbat node near J7 and with all of them together, I can just route all of them together without any vias since they're all right next to each other
- *note to self that some saved images are in a one drive folder* FOR MYSELF

- the circled unrouted resistors resemble the fact that they just need to connect to any GPIO, and instead of routing them through a mess above the MCU, i only needed 2 vias by routing them below (R4, R5, R6)
- finally, if debug led is flexible, i want to reroute it (green) because it's closer with the need for less vias.
- i just realized i did everything in kicad 9.0 and we might be cooked
- i will work on presentation stuff (some pcb fixes tomorrow)
- ended at 10:30
- back at 11:15 after dropping stanley off; since i used wrong kicad version, i'm just spending time telling abhijay all the traces i made
- done; i told him the adjustments i made so he can account for the no connects i want to use
- out at 11:20 GOODNIGHT
- lab session with abhijay
- i set up the command for read jedec ID and the plan is the first check MOSI line to make sure that the MCU is sending the right commands.
- running the code results in a bunch of gibberish displayed on the oscilloscope even though i got spi working for the LCD; i'm just testing MCU sending spi in general but it's not working right now
- the teal represents me just moving parts closer together (take up less space)

- i can see 9F (command i intend to send) but the oscilloscope still displays gibberish (i'm trying to read MISO line because i found the probe for it on the oscilloscope)
- i scaled the oscilloscope better with the help from stanley; i am indeed sending the command properly
- after reading some documentation, i might need to assert the hold pin high so that the flash chip can accept what i am doing according to datasheet here because i didn't do that earlier
- just realized the clock also stops, which might be why the slave isn't sending anything back; i will now try to do stuff with the dummy clocks so that my master does not disable the clock prematurely
- i am generating dummy clocks but they are repeated and delayed; i only want a delay after the dummy clocks are sent; not before. i don't want to get rid of the while loop but imma see what happens when I do

- stanley took over the board so i cannot prototype anymore. i am going to start preparing for the presentation
- just kidding, i'm gonna try to find a 5 pin header that we can connect the programmer used on the f4 to our microcontroller: https://www.digikey.com/en/products/detail/samtec-inc/TSW-105-05-F-S/7865085?gQT=1
- according to abhijay, most of the footprints on the PCB are mouser parts so even though I found a footprint on digikey here: https://www.digikey.com/en/models/7865085 i will try to find something on mouser

- work day with Stanley today
- i just arrived at lab and met up with stanley, was gonna continue pcb wiring stuff but idk what happened to abs; i know he's not done prototyping flash ic yet so imma try to make some progress on that today
- i'm not that familiar with the flash ic so i'm reading the documentation right now
- really quick tho, i'm gonna solder some wires together and then come back

- i did a decent job ^
- okay back to the flash ic
- based on the pinout of the datasheet and the way abhijay wired stuff up and drew the schematic, I will pay attention to SOIC 300-mil
- i don't exactly know what PA0 PC2 and PC6 do but i will set them as GPIO for now
- gonna keep reading the datasheet and figure out what those pins do:
- nevermind PA0 is chip select so just gotta figure out what PC2 - write protect and PC6 - hold input do
- these are the notes below the pinout:

- Notes:
- 1. IO0 and IO1 are used for Standard and Dual SPI instructions
- 2. IO0 - IO3 are used for Quad SPI instructions, /WP & /HOLD functions are only available for Standard/Dual SPI.
- i am a little confused because IO0 is MOSI, IO1 is MISO, IO2 is write protect and IO3 is hold input
- sure, IO0 and IO1 are part of the SPI protocol but then it says IO2 and IO3 is part of quad spi but those same pins / functions are only available for standard / dual SPI
- oh it's an actual protocol, gonna look up a video explanation
- okay so far from the video, standard, dual, and quad are 4 different modes of SPI
- so the basic system of QSPI is 4 bidirectional data pins IO0 - IO3 (haven't seen anything for dual spi yet) but this is significantly different from traditional SPI because MISO and MOSI are directional lines of communication; i need to see the advantages of quad vs traditional but after some understanding, it sounds like IO2 and IO3 are bidirectional lines in quad SPI but for our basic SPI mode, the pins serve as write protect and hold
- according to video, qspi is high speed and designed to work with flash chips so I wonder if that's what we need to use
- series of events:
- when master pulls chip select low, it will send a command to the slave
- in just 2 clock cycles, an entire byte of data will be send (higher throughput)
- then followed by an address associated with the command (read, write etc)
- qspi supports 24 or 32 bit addresses

- if we need something from the slave, we will have "dummy" cycles to wait for the slave to respond (since qspi is fast but flash chips might take time to respond)
- ok page 10 of the datasheet is helpful: HOLD basically makes the flash chip disregard MOSI and CLK and MISO will be high impedance; it's like pausing the device
- WP basically means that ... actually i'm kinda confused because i don't know what we have to do with writing to the status register when apparently one of the bits (WP-E) controls the modes of the /WP which makes no sense to me
- okay well either i find tutorials on how to get started or i try to follow the flow chart:
- ideally, i arrive at the situation where my test works like this: write to address1, write to address 2, read address1, read address 2. i don't want to immediately read the same address i wrote from in case the variable is improperly manipulated. instead, if i read a different address (one i wrote to in the past) and it's correct, i'll assume that the interfacing works
- this is also a little tough because there are multiple instruction sets which is super annoying

- turns out the flow chart isn't really something I personally control, so I will probably just have to try to send commands and pray; I do know that my part is W25N01GVSFIG so the left flow chart is what happens automatically in the flash chip
- given that, I am to follow instruction set table 2 due to part number

- i will start by writing code to reset the flash chip but since there aren't any displays, there's no confirmation that im actually resetting; best i can do for now is probably probe the SCK and MOSI and make sure I'm sending the right data

- i found the perfect test function: there is a flash read jedec command where i read manufacture ID related stuff. if i can read that, i'll know that I can do some communication with the flash ic
- according to the timing diagram, I don't see HOLD or WP used at all... maybe i can ignore it?

- my laptop is about to die so i will try tomorrow (i don't have my charger with me)
- work day today with abhijay virtually
- me and abhijay (we couldn't meet yesterday) are going to finalize schematic once more - we are discussing programming header rn
- we have an stlink from ece 362 already and we want to explore these programming headers onto our PCB
- https://www.digikey.com/en/products/detail/on-shore-technology-inc/302-S101/2178422
- https://www.digikey.com/en/products/detail/sullins-connector-solutions/SBH11-PBPC-D05-ST-BK/1990062
- i need to determine which one is closest to the MCU we had in 362
- https://www.digikey.com/en/models/1990062
- we have agreed to go with the longer link product because it has a footprint we can add to our PCB
- now that we found the header, we want to connect st link v2 to it to program our board so we are looking up the pinout
- it's actually given in the image below
- he also caught me up on the progress of the pcb (i was on hold with getting lcd display to work)
- he showed me all the parts and the debug headers etc so now i know what's on the board and what is going on
- i probably am going to help him prototype the flash ics (we did get them pretty late and we have midterm design review on Friday)
- in the midst of going over the programming header, apparently the one from 362 is like a clone or something and may or may not work well with stm32cube ide, so we either have to
- check to see if the cubeide works with the st link clone or we just find a different (more compatible programmer). for now we are going to find a different programmer
- this is the first one i found (navigate to tools and software on this site https://www.st.com/en/development-tools/stm32cubeide.html#tools-software)
- https://www.digikey.com/en/products/detail/stmicroelectronics/STLINK-V3MINIE/16284301?gQT=2
- this is like the first one i found; though it needs a usb-a to usb-c converter and I've never used this before
- https://www.st.com/resource/en/data_brief/stlink-v3minie.pdf
- here there are 14 pins instead of 10, but they aren't specified
- found it in user manual lol https://www.st.com/resource/en/user_manual/um2910-stlinkv3minie-debuggerprogrammer-tiny-probe-for-stm32-microcontrollers-stmicroelectronics.pdf
- i'm gonna assume the vcc is 3v3 because the max target voltage is 3v3 on page 12, unlike the stlink v2 which has pins connecting to 3v3 and 5v
- there's also 2 columns for pin numbers and i don't get how that works; stdc14 has 2 extra pins we don't need so i'm going to find a different part

- personal work day today
- abhijay has done a little more progress on the PCB without me, and this is sort of an issue because I need to contribute as well
- right now he just asked me to look for a connector for the LCD which I am assuming is an attachment on the PCB that acts as a hub of sorts for wires to go and then the wires will connect to the LCD
- my solution is to schedule time with him tomorrow (Saturday) to go over the PCB stuff so that I will not be left behind and can contribute anything else I can before reviews next week
- i'm going to watch the basketball game today and I'm eating dinner at like 6 PM so I'm just going to spend today to look for the connector and give it to Abhijay and then talk to him tomorrow
- refresher, we are using newhaven lcd which is oddly pinned because there is a gap between the series of pins as seen in image below

- nevertheless, i talked to abhijay yesterday already and he said i should act as if there is a pin there, and find a connector that can interface 10 pins even though only 9 pins are used in the LCD
- i looked up PCB connector (i know I need 10 pins) but a quick google search showed me that there are a lot of different ones

- that is super overwhelming and i'm sure there's like pros and cons and i think something was mentioned in a lecture some time ago so i am going back to the slides to check
- ok yeah locking clip connectors, here's the slide. i will look for a 10 pin locking clip connector

- talking to abhijay right now and he is proposing i use the connector on stanley's and i figure out the wiring
- however i don't know how many wires are attached to stanley's fingerprint sensor so i'm content but also opposed to the idea
- i showed him this image but then i looked at the datasheet and i wonder if i even need the P1 pins because P2 is SPI / I2C and the P1 is like TTL serial input

- if we only need 5 wires, so far I found this which i recall from 20007 and you securely screw the wires tightly
- we are using a variation of the fingerprint's sensor for now (me and abhijay decided)
- today is manlab day
- attended phil walter meeting - we need to get going on the schematics and pcb layouts
- the flash ic and thumbprint sensors have arrived but I need to make sure all auxiliary components to the stm32 are included in the schematic because I am working with Abhijay on this task
- this includes all the caps, resistors etc.
- I am going to look at VCAPs and power supply management on the stm32h7 datasheet here: https://www.st.com/resource/en/datasheet/stm32h743vi.pdf
- i will spend the rest of lab today (and other time) reading that; i could also help prototype the flash ic as well if abhijay isn't done debugging with the Arduino
- i see this image of VCAP (6.3.2 image below) but I don't see anything talking about R leak; i asked Stanley about what it could mean (he's an EE) but he has no clue

- i need to figure this out soon because we need to figure out how to integrate it to our schematic which we need to finalize before we finalize our PCB design
- i saw this image on electronic stack exchange after looking up "r leak parallel to capacitor" and it basically models a nonideal capacitor which leaks current
- i got asked by abhijay regarding how i setup SPI because he's trying to use it to figure out how to interface the microcontroller with the flash ICs
- i basically showed up how I used the HAL transmits and the drawbacks i experienced when trying to get the LCD to work; this included the inability to send multiple bytes at once via one HAL function call, the specification of data types that must be inputted, as well as directing him to the stm32f4 hal driver on GitHub so that if there is a function that he wants to use (because he needs to do HAL SPI receive in addition to transmit), he can read the documentation and source code there
- gotta find abhijay a connector though for the LCD, definitely tackling that next
- session with Stanley
- i'm going to see what i am able to accomplish with the LCD because i know i can at least display text
- even though i am trying to send a command, the character that has the same ascii value as the command gets displayed instead of the command which is puzzling to me
- i'm going to try to purposely display characters and see if they appear on the screen, starting with the letter A (no commands); the display is in a loop so the letter A should be displayed throughout the LCD with a 1 second interval that I set
- that's exactly what happens, so at least I can display characters

- going to try to display a word "welcome" note that my spi transmit (sending characters for lcd to display) is still in a loop right now
- unfortunately, instead of the word welcome, only the letter e is displayed

- i'm going to try to add a while loop at the end of the spi transmit that doesn't allow the program to continue until HAL spi state is ready
- only the letter e is still displayed like the previous image so that did not work, with the exception of the appearance of one letter m

- i'm going now try moving the spi transmit outside of the while loop in hopes of the my text displaying only once. i will have to unplug the lcd in order to clear its display because i have not gotten the command to work yet
- nothing gets displayed, just a blank lcd besides code from the previous code running

- i'm now going to try only displaying a single character (letter A) once
- that ends up working

- i'm now going to try sending two letters in an array and hope that two different letters get displayed
- instead of just the letter A, I'm going to send A, B
- ``` HAL_Delay(1000); const uint8_t tx_buffer[] = {'A', 'B'}; HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); HAL_SPI_Transmit(hspi1, tx_buffer, sizeof(tx_buffer), 1000); while(hspi1 -> State != HAL_SPI_STATE_READY); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_SET); ```
- that is my code (can probably refer to this for previous steps)
- only the letter B is displayed, it could be due to my sizeof having issues, although i doubt it. going to replace that with the number 2 instead and see if that changes anything

- it is the same result, but i'm going to switch the code back to sizeof because it is more flexible on how many characters I want to send
- I thought that would work due to this link talking about how to send multiple bytes https://community.st.com/t5/stm32cubemx-mcus/sending-more-than-8-bits-through-spi-using-hal/td-p/182703
- I'm going to try to increase the timeout from 1000 to 10000 but I am not sure how that changes things because according to the function definition in this library: https://github.com/STMicroelectronics/stm32f4xx-hal-driver/blob/master/Src/stm32f4xx_hal_spi.c, it isn't specified for me
- the result is the same, only the letter B is displayed. i bet I could display multiple characters with multiple HAL transmits though
- this brings me back to when i tried to send a command, which consists of one byte being FE, and another byte being a particular command. it seems like in both scenarios (sending characters / sending commands), only the last byte is recorded, which explains why instead of sending a command, the letter is displayed (note that to display a character, simply send the ascii value itself)
- i will try to second two characters individually (although not ideal code wise) by having 2 calls to hal_spi_transmit and see if the 2 letters can be sent individually but at least have them both appear
- also, stanley pointed out that i'm using spi1 instead of spi2 so i'm going to switch over now (LCD is supposed to use spi2 according to schematic - honest mistake by me!) note that new pins are MOSI now being PC3 (originally PA7) and SCK now PB10 (originally PA5)
- i am going to take a step back and make sure I can send the letter A to the LCD by itself to confirm my SPI transition worked
- i forgot to only send one character, but B is still there. I will now try to send one character at a time like this
- ``` HAL_Delay(1000); const uint8_t tx_buffer[] = {'A'}; HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); HAL_SPI_Transmit(hspi2, tx_buffer, sizeof(tx_buffer), 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); const uint8_t tx_buffer2[] = {'B'}; // HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); HAL_SPI_Transmit(hspi2, tx_buffer2, sizeof(tx_buffer), 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_SET); ```
- very bad practice in my opinion in terms of coding but i need to try to get this to work
- I can display AB but using functions and reinitializing arrays like that is not good practice

- i will try to loop the function to display AB everywhere on LCD and then try to clear it all at once
- now that the LCD is filled with AB, I am going to clear it using the same way I sent both characters

- to clear screen, I am supposed to send 0xFE followed by 0x51
- I have cleared the screen!!!

- in hopes of at least not having 2 initialized array, i'm going have one array but instead index them when sending the bytes like this
- ``` HAL_Delay(1000); const uint8_t tx_buffer[] = {'A', 'B'}; HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); HAL_SPI_Transmit(hspi2, tx_buffer, 1, 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); // const uint8_t tx_buffer2[] = {LCD_CLR_CMD}; // HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); HAL_SPI_Transmit(hspi2, tx_buffer + 1, 1, 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_SET); ```
- i can no longer use sizeof because I need to only send one byte at a time (having issues when trying to send multiple at once) if this is the case, i will just create wrapper functions around these hal spi transmits like clear_screen, display_welcome etc.
- going to try the above code to make sure it works; functionally the same, but better code quality
- it works!
- i was able to get the same AB loop as earlier

- i still wonder why the 362 manual required to function set though
- i am now going to display a welcome message and see if it works
- as for code quality, because "welcome" has more bytes than AB, i am going to try to at least condense everything in a loop like this
- ``` for (int i = 0; i < sizeof(tx_buffer); i++) { HAL_SPI_Transmit(hspi2, tx_buffer + i, 1, 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); } ```
- well... only w and e got displayed after running that code

- i also changed welcome to wulcom because there are 2 repeated letter e's and i didn't know which one it was sending
- as a result, w m gets displayed, so only first and last byte. that will be an issue and i need to see what is wrong

- initializing buffer array with a fixed integer does not do the trick yields same image as above, going to try replacing sizeof with the number 6
- i'm going to change size of to a fixed integer value but that shouldn't do anything; that didn't do anything, same image as above
- i decided to add a hal delay at the end of for loop before next iteration and this is the result
- it can display the text

- according to the datasheet the execution time per byte for LCD is 100 uS so it's possible that i am overloading the LCD buffer until adding my hal delay like this
- ``` for (int i = 0; i < sizeof(tx_buffer); i++) { HAL_SPI_Transmit(hspi2, tx_buffer + i, 1, 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); HAL_Delay(100); } ```
- i'm going to display the actual welcome string now
- ``` void lcd_welcome(SPI_HandleTypeDef *hspi2) { HAL_Delay(1000); const uint8_t tx_buffer[] = {'w','e','l','c','o','m','e',' ', '2',' ', 'e','c','e','4','7','7'}; HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); for (int i = 0; i < sizeof(tx_buffer); i++) { HAL_SPI_Transmit(hspi2, tx_buffer + i, 1, 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); HAL_Delay(100); } HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_SET); } ```
- here is the result when that functions is called

- i got curious and now decided to test the display off command, it doesn't turn off the LCD, but it just makes the display no longer functional (not display anything)
- the order of function calls is like this lcd_clear(&hspi2); // lcd_off(&hspi2); lcd_on(&hspi2); lcd_welcome(&hspi2); lcd_cursor_location(&hspi2, 0x40); lcd_welcome(&hspi2);
- the lcd remains clear as expected but when i uncomment lcd_off, the display still doesn't show the welcome message so I am going to try to use display on
- the welcome message is back. i will show a demo in the video below
- i will now try to display a message on the second row because the first row is limited to 16 characters (both rows are)
- the datasheet indicates this below where i now need to send 3 bytes in a row. i hope i don't accidentally display a character for the 3rd byte

- while working on the code, i decided that I wanted to clean up the structure of all my wrapper functions, so instead of something like lcd_clear, lcd_off, lcd_welcome being something like the lcd_welcome void function example above, because each function uses the for loop block and the HAL GPIO toggle, I moved all that code to a function called send_bytes and it made my code a lot cleaner. it took some time to debug but now the display works as normal. the functionality has not changed, but at least the code quality has improved. this article definitely helped me write my code: https://www.geeksforgeeks.org/how-arrays-are-passed-to-functions-in-cc/
- i now have a send_bytes function looking like this:
- ``` void send_bytes(SPI_HandleTypeDef *hspi2, const uint8_t *tx_buffer, size_t size) { HAL_Delay(1000); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); for (int i = 0; i < size; i++) { HAL_SPI_Transmit(hspi2, tx_buffer + i, 1, 1000); while(hspi2 -> State != HAL_SPI_STATE_READY); HAL_Delay(100); } HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_SET); } ```
- each wrapper function that i just listed is now simply this: void function_name(parameters){ // set buffer //call send_bytes }
- i wonder why i need to pass buffer size as parameter though; in my send_bytes for loop, i was unable to do for(int i = 0; i < sizeof(*tx_buffer); i++) quite strange! sizeof(tx_buffer) in the for loop doesn't work either! the sizeof function (yielding size_t size) must be used in the caller arguments and get passed in!
- i developed the code for writing on second line:
- // note that the hex location ranges from column 0x00 to 0x0F for row 1
- // note that the hex location ranges from column 0x40 to 0x4F for row 2
- void lcd_cursor_location(SPI_HandleTypeDef *hspi2, const uint8_t hex_location) { HAL_Delay(1000); if (hex_location == HOME) { // call home command } else { const uint8_t tx_buffer[] = {LCD_PREFIX, LCD_CURS_LOC_CMD, hex_location}; send_bytes(hspi2, tx_buffer, sizeof(tx_buffer)); } }
- called functions in this order
- HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); lcd_clear(&hspi2); // lcd_off(&hspi2); lcd_on(&hspi2); lcd_welcome(&hspi2); lcd_cursor_location(&hspi2, 0x40); lcd_welcome(&hspi2);
- this is the result on the LCD

- i am done for the day and am going to upload this journal entry to ece477 website
- i am going to work on the software formalization
- i am writing this software formalization based on joshua's software overview as well as what I think we will need in order to interface with the other components that we have not touched yet
- i am mostly splitting up the functions that we need to complete based on what functionality we need to do for PSDRs
- granted, we are making a thumb drive with data stored in flash ICs, but our device won't be usable without the keypad, lcd and fingerprint sensors working since our "encryption" is decrypted via those devices
- we haven't gotten PCBs yet, and we haven't finished every single part, but as for hardware and getting schematics and PCBs done, the only tests I am requiring are ones that allow the microcontroller to interface with the external devices properly
- this includes reads and writes with flash ics, detecting keys from keypad, detecting fingerprint from sensor, and being able to display information on LCDs
- we don't need to worry about integration now because the schematic separates all the components to interface with the MCU on different pins so the integration later is all just software logic
- i don't really have images to share for this entry because writing the software formalization mostly involved just my thoughts as well as what we established as a group before joshua wrote his software overview
- as for data structures and stuff, i can only give a brief discussion of what is physically needed ie. structs for SPI and UART etc. because there are always so many different ways to code out something that ends up working the same way
- session with Stanley
- tried adding all the breaks but it doesn't work
- LCD still won't turn on (i'm hoping the LCD i requested works a little better?)
- gonna keep trying, going to only do function set and display on
- nope still not on
- ok i found a Newhaven display at my lab bench and it's a little different; gonna look up pinout and commands for it and hope this works
- datasheet is here: https://newhavendisplay.com/content/specs/NHD-0216K3Z-FL-GBW-V3.pdf
- btw i lowered clock speed as well and that's not working either
- OH WAIT I HAVE LOOSE WIRES let's fix that real quick
- nope that didn't fix it either
- it requires RX for TTL serial input port but I'm gonna ignore that and hope i don't need it because at this point, the best thing I can do is to just try different things and not stick with the same LCD model if I can't get it to work yet
- OK THE NHD 0216K3Z CAN ACTUALLY TURN ON
- LET'S SEE IF I CAN SEND COMMANDS
- what the heck is r1 r2??
- welp Stanley found it on the back of the chip EVEN THO IT'S NOT EVEN IN THE DOCUMENTATION LOL WHAT
- lcd is default on, trying to turn if off
- initial code isn't working, gonna change the slave select in case it's active high
- nope didn't work
- saw documentation require cpol and cpha to be 1 each, gonna try and hope that works!
- OKAY, IT DIDN'T TURN OFF, BUT DISPLAYED A BUNCH OF DIVISION SIGNS
- okay, instead of sending 2 individual bytes, i am sending them together, but that does not turn off the LCD, instead only erasing the division signs...?
- WHY ARE THERE RANDOM CHARACTERS ON MY LCD
- tried to display a blinking cursor
- here is the result
- i changed the clock phase because i was initially confused by the STM32 description f CPHA set to 1 vs CPHA being a value of 1 in the LCD documentation
- instead of pure gibberish, after adding a HAL delay between each SPI transmit, we are no longer getting gibberish, but instead just a bunch of repeated letters, primarily B and Q.
- gonna try using the HAL's NSS; i don't think it works because it doesn't properly show up on oscilloscope
- switching back to the toggling of GPIO pin for NSS
- every now and then the display will clear according to my command but then a bunch of Q's just appear on the LCD screen
- gonna call it here; will try a 10 bit custom format via the HAL (digging through the weeds) on Monday or something
- gonna upload this journal to the website and clock out because my brain is fried and anything I do now will probably just be inefficient and unproductive
- WAIT WAIT WAIT
- WHILE LOOKING AT ASCII
- B IS 41 AND Q IS 52
- EVEN THOUGH I'M TRYING TO SEND A COMMAND
- I'M DISPLAYING ASCII CHARACTERS
- that's weird because i'm following the syntax to send the command...?
- whatever DO NOT CHANGE THE BAUD RATE OR ANY UNDERLYING FUNCTIONALITY OF THE SPI INTERFACE FOR NOW BECAUSE SOMETHING IS CLEARLY WORKING BUT SIMPLY LOGICALLY INCORRECT
- next week I am going to investigate why I am displaying ASCII characters instead of sending commands
- session with Stanley
- short day today because I have a ece 568 meeting to go to later
- one thing I haven't tried is 5V as VCC; LCD can support it because it's on the datasheet
- lcd still doesn't turn on
- stanley found a tinkercad setup and after running the simulation, this was able to turn on the LCD
- lcd still doesn't turn on after copying the entire schematic; i'm going to try a different LCD tomorrow if I can find one
- going to add a bunch of HAL checks for the busy state before sending bytes, but will test that tomorrow before using new LCD
- contributes to LCD progress because we are now going to avoid all the different ways that don't work in the future
- man lab day
- attended phil walter meeting regarding the good progress on journals and the locked PSDRs, and alert that we need to be finishing stuff up related to PCB and prototyping by week 8
- stanley figured out how to display UART on the oscilloscope so I'm going to ask him how he did it because I want to see if my SPI commands are displaying properly
- I can see the SPI commands being sent properly via oscilloscope including slave select, clock, and data bits
- i am now puzzled as to why the LCD is not displaying a blinking cursor
- i am checking my wiring once more to make sure nothing is wrong, and compared to the 362 wiring, everything looks good
- i'm going to make sure that the LCD itself is even usable so I'm going to run both my code and Stanley's code on his 362 microcontroller to see if the LCD can turn on
- running into autotest issues; removing that line of code to see if the LCD can turn on
- it does not; it might be time to look at more tutorials (if any) or maybe try a different LCD
- session with Stanley
- going to try to get LCD SEH1026A working because I got SPI working last Friday
- hoping that configuration commands via HAL on STM32CubeIDE can communicate with the LCD
- bro why are the pins on the dev board in the most random places??
- making a note here so that I don't have to look for these pins again in case i unplug them: brown wire is PA4, purple is PA7 and blue is PA5 for NSS MOSI and SCK respectively
- had a chat with stanley and we both agree that DMA is not needed for this application when interfacing with the LCD because we are not constantly sending a lot of data between peripheral and memory
- how am i supposed to send a 12 bit value using HAL SPI Transmit which only uses 8 bits?
- LETS GOOOOO https://community.st.com/t5/stm32cubemx-mcus/sending-more-than-8-bits-through-spi-using-hal/td-p/182703
- after some debugging, no errors, but LCD displays nothing
- ok forget trying to display a string, i'm going to try to just get a cursor to display
- it seems trying to display text was too ambitious
- okay i'm going to see what the ece 362 lab manual is doing differently
- strange, i'm sending commands in the same order
- clearly, the cursor is not showing, but i'm going to check my oscilloscope tomorrow again to make sure that I am sending the proper commands
- this lcd is part of our design requirements, so getting this thing to work would be very important
- going to be a productive day
- going to start today's session by getting SPI to work using STM32Cube and program the STM32F4 dev board properly
- having trouble updating stm32cube directory
- checked GitHub and yes i pulled from main
- checked my file directory and yes the new files are there, but after restarting, exiting etc stm32cube ide the new files still aren't there
- going to try opening the workspace in mx to see if that solves the issue
- i don't know if that did anything but now i'm gonna open stm32cube
- still not there
- going to somehow exit the current workspace and reopen it
- i was trying to sync the folder but then stanley took over my laptop and deleted the workspace and reopened it and now it works but i want to try syncing next time
- i am now trying to figure out how to display the first message on the lcd via commands and SPI setup
- i will probably look at the HAL library because I want to first start by setting up SPI; i will figure out the commands in a bit
- why is there an spi init struct but it's not used in HAL's spi init function? i am trying to figure that out
- i don't see how HAL uses spi_inittypedef
- maybe i have to just initialize the struct and then call the spi init function? gonna try that now
- i give up; stanley convinced me to look a tutorial after wasting so much time trying to figure it out myself; here's the tutorial i am looking at: https://wiki.st.com/stm32mcu/wiki/Getting_started_with_SPI
- i am trying to figure out DMA mode and interrupt mode because that is what is sending out the data via SPI
- i think i am using blocking
- i tried building it and somehow HAL itself has a bunch of issues
- why is this thing mad at me for trying to declare an array extern
- now i tried and i got multiple definition
- moved everything into C file but nothing is being read on oscilloscope
- okay turns out extern is if a different file wants to access a variable from another file, which makes no sense in the .h file
- running the project just shuts down
- i am trying to use DMA mode and that didn't work either and now stanley's code doesn't work either
- nevermind for some reason main function clears itself every time the generate code is initiated after changing IOC file
- i'm basically just hooking up the oscilloscope to watch either the the pin that outputs the clock or the pin that outputs MOSI
- ok so after moving to pin PA5 (SPI1 SCK) nothing on oscilloscope either
- ok I found out what blocking interrupt and DMA mode are; I think I will use blocking mode because the communication is done via polling
- gonna try changing clock polarity; didn't do anything except reverse default pin state (high / low) on oscilloscope
- there's a warning in my console but i can't seem to catch it
- https://www.youtube.com/watch?v=eFKeNPJq50g - just watched that video and I thought it was pretty useless because it was pretty much what the tutorial had to offer to me but the only thing I used from the video was changing clock prescaler
- i think i see a clock signal generating and maybe the speed of the clock was too fast so after slowing down the frequency by increasing prescaler from 2 to 64 we could see something on the oscilloscope
- gonna switch oscilloscope to view MOSI line now (PA7)
- okay sending an "A" vs sending a "C" is different so... yay! (we can see on ASCII)
- looks like I got it working the first time but the rate was so fast that the oscilloscope couldn't detect it until the trigger line was moved
- from now on, if i don't see anything on the scope yet, try using a trigger or slow down the output rate (i did that by increasing prescaler)
- now that I have SPI working and sending letters in ASCII values, I'm now going to try to display information on the LCD screen and have it change its display depending on what the user presses on the keypad
- attended manlab
- attended phil walter's meeting
- he mentioned that our PSDRs and stuff are good but we need to get going with prototyping and PCB design soon
- working with Stanley to setup my STM32Cube because I know he worked with it already
- I am trying to generate code on my stmcube via the ioc interface but the code itself does not change
- the solution he found on some community post also does not work even though I got a new version of STM32Cube IDE already
- I had to download a new version of STM32CubeMX but i can't even run the installation executable
- i finally got my stm32cubeide setup after restarting my computer and properly downloading STM32CubeMX
- going to update my STM32Cube IDE from 1.11 to 1.17
- i was gonna start coding after pulling from github but the IOC file was incompatible with my STM32Cube version
- updating is stuck at like 40% progress and it won't continue
- i'm going to resolve this during ManLab
- i actually looked into some parts for about 30 minutes just now and here's what I found:
- https://www.mouser.com/ProductDetail/Display-Visions/EA-TFT024-23ATNN?qs=sGAEpiMZZMt7dcPGmvnkBgpwamjCGwcHpXc9jMvByuCnqVKcBMeUoQ%3D%3D
- it uses SPI but has a display we didn't use in class; might have a shorter learning curve vs HD44780 UNLESS we can get the WEH001602A but I couldn't find a website to buy it
- https://www.adafruit.com/product/419 that is also a keypad I found but it's up to Abhijay (who i think is taking care of it) to determine which one he wants best; current limitations include having only numerical keys and some special characters is enough
- now i will spend some time looking into the HD47780 and hopefully not too much of a learning curve
- https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller consulted that website first and it seems like
- i saw VCC VEE and VSS in that article and it seems VCC is positive, VSS is ground or negative, and VEE is strictly negative
- why 3 terminals? i have no idea
- there's also an 8 bit data line to communicate with the controller so I think we need to setup 8 microcontroller pins to handle that
- i am going to read the actual datasheet now and I hope i'm not wasting my time
- https://cdn-shop.adafruit.com/datasheets/HD44780.pdf
- ok i'm back, it's actually super cool but at first glance looks a bit complicated
- i saw a table full of upper and lower bits that correlate with what is displayed on the screen depending on dataline (4 bits upper and lower so I assume that's the dataline communicated via MCU?)
- i also like how there's a set of instructions but for things like cursor display etc what is all the acronyms when it goes into a single bit??? page 24??
- mostly just a bunch of commands i see and it's synchronous so this has to be clocked as well and on each edge is when we send an input and we have to deal with ~R and W (what's the difference between not read and yes write...?)
- attended mandatory lab section
- had an initial lab meeting with phil walter to improving our PDSRs and functional specifications but to also get going on prototyping
- i'm gonna look into potential keypads and lcds our team can use; i initially looked for parts in like the first two weeks but i'm looking again just to finalize for prototyping purposes
- i'm probably going to make sure I can help code out the connection to the lcd since i think one of my other teammates is going to handle coding the keypad
- going to look at adafruit.com and digikey.com and i could technically look into mouser as well and if i'm desperate i'll look at amazon
- i'm super frustrated because a lot of the parts don't specify what protocol they use
- this product here is what we used in 362 and another similar part found in our lab: WEH001602A
- where do i even buy this product?? i couldn't add to cart?? what?? https://www.winstar.com.tw/products/inquiry
- just now i also looked into LCD vs OLED and one uses a backlight sort of mechanism while another uses each pixel to emit a color of light on its own
- here's another part i looked into: https://www.adafruit.com/product/181
- however that uses some HD44780 but i don't know what that is
- ok so after some time it turns out HD44780 is another sort of protocol but I don't exactly know how to use it? it doesn't necessarily operate on SPI or I2C or UART or anything so I can't really configure the other end
- when i interned at garmin i used a proprietary protocol that required simply pulling pin high open drain with pull up resistor to VCC or pull low so maybe I have to do that here? i will look into it later but I got an exam this week
- discussed with phil walter about how our PDSRs look better and functional description is good but we really need to get moving on prototyping
- i will try to find a SPI lcd even if it's one we never used before and a keypad as well except I think abhijay will take care of coding it?
- i might try looking into HD47780 as well but I do have a time constraint due to my exam
- following new PCB tutorial via this channel playlist: https://www.youtube.com/watch?v=vLnu21fS22s&list=PLUOaI24LpvQPls1Ru_qECJrENwzD7XImd
- i like how the video uses an Arduino, serves some purpose like our STM32 even if they are different parts
- nice, hitting P key or the icon right below the op amp on right side of kicad schematic screen is where i find power symbols
- key point in video: vcc is input / output, but kicad does not consider it connected to a 5V (whatever input or output voltage being your reference)
- however if there are multiple 5V references, kicad assumes they're connected
- another shortcut to edit values, i can click a device (resistor / capacitor) and click the v key on my keyboard to edit values
- finished basic schematic with buttons and next video try to add oled screen, but that's just creating a custom part; reviewed anyway, but I've done it already and everything checks out
- recall steps: file -> new library -> new symbol (right click on new library connected) -> add rectangle (see icon on right) -> add pins (see icon on right) -> import it into main schematic
- (to give it a name, go to symbol properties in main schematic and give it a value) and then update symbol, make sure value box is selected, click update and close
- repeat that step for any custom part but i'm going to skip these
- note that my Arduino has many unconnected pins so we need to add that in the editor (see the no connection icon on right of main schematic) - (you can use insert key on keyboard as well)
- finishing 2nd video:
- run electrical rules checker (failed!) but failed in youtube video because ground was a power output to a custom component; there's a workaround because it doesn't like the way ground acts as power output for kicad
- i love the fact that this video actually shows you how to deal with the electrical rules checker because the previous tutorial didn't
- my failure is due to ground pin not being driven by ground symbol but youtube video says we can ignore the error as long as the two pins are both connected to ground.
- third video & 4th video:
- in 3rd video = choosing parts, schematic can't be directly converted to pcb because schematic simply has symbols
- so we go to footprint table to tell editor what parts we are exactly going to use
- click assign footprint in main schematic (we assign capacitor through hole on left panel) and then on the right, we choose a specific part to see a representation of how that part goes on the board
- normally you check the part you need online and match it with what can be found in kicad
- recap, in assign footprints, click the part you want to assign (middle panel show image), click on left panel to pick which library of part you want to assign, then the right panel for the specific part
- i'm personally skipping this step but for custom footprint (getting kicad footprint for custom part), go to main project page -> footprint editor -> new library -> select through hole -> give part a shape -> pick Fsilkscreen -> choose gridsize -> create desired size of component -> create from selection -> create rule -> uncheck keep out tracks + vias + zone fills -> add pins of desired size (yellow circle under cursor on right panel) -> feel free to use ruler on right panel -> label pins with text box -> now you can assign this new part you made as the footprint to your custom part
- 5th video:
- switch to pcb editor -> choose pcb manufacturer by picking kicad template and import board design rule template -> allows you to handle tolerances of manufacturer
- that was my main takeaway from the video but it's cool to see how depending on who your manufacturer is, you can make sure that they're machine tolerances are imported into kicad but you gotta find it online
- youtube video has like a github that shows you the file https://github.com/sethhillbrand/kicad_templates
- video example uses JLCPCB1-2 layer as an example
- 6th video:
- update pcb from schematic
- MAKE SURE YOUR FOOTPRINT EDITOR IS SAVED LOL MINE DIDN'T BUT AFTER SAVING IT (thank god i didn't close it) I WAS ABLE TO PUT THE PARTS ON MY PCB
- white lines show the connections needed between parts (editor expects connections via wires)
- try to group parts that need to be together
- avoid having the white lines crossing over each other
- for example, resistor, capacitor, and switch are like one unit so we should group them together
- move parts around to try to reduce diagonal lines
- draw edge cutting box (basically borders of our board)
- edit copper fills to take care of all ground pins
- click front then add fill zone (right panels then select both front and back) and now we filled GND layer and now all gnd pins are connected to our copper
- I just realized my Arduino is flipped so uhhh AHAHA I MIGHT HAVE TO RESTART THE PCB LAYOUT OOPS
- okay i flipped the Arduino after removing the red zone but the GND and 5V pins are showing paths through the nano so let's see if I can fix that
- i love the fact that you can see a 3d model of your pcb; i probably could've gotten this far in the old tutorial but the kicad UI was so different that it was hard to me to catch up because I couldn't find the functions the previous playlist had but I highly recommend finding the right kicad version the youtuber is using next time
- there's not too much i can do rest of this week because I have an exam on Friday that I need to take care of; i need that class to fulfill my science tech and society requirement
- finished remainder of the blinky kicad tutorial
- kepy trying to follow along but i'm honestly super lost because the kicad versions aren't even the same
- switching to similar tutorial with same youtuber by following the playlist starting back at this video https://www.youtube.com/watch?v=01OYONrYtNQ&list=PLy2022BX6EspFAKBCgRuEuzapuz_4aJCn&index=3
- this kicad version isn't the same as mine either even though this video series is newer so I'm struggling to follow along this one as well
- the youtuber clicked this button to do some electrical error check as circled here in the schematic
- however my kicad looks like this and i don't even have that option
- i honestly tried to keep going and skip some steps and arrived at the PCB video where I ended up stuck at this part
- this was honestly a huge waste of time and all I was able to do was draw a circuit schematic of the components that I need; I shouldn't have tried to deviate and skip a bunch of steps that I couldn't follow
- i'm going to spend some time just scanning a bunch of different videos to find both a beginner friendly tutorial as well as a tutorial that has the Kicad that I can follow 100% exactly step by step
- after a lot of searching, I found a completely different tutorial that matches my version of Kicad I hope: because here is the tutorial
- i have a lot of faith in this and will start this tutorial tomorrow
- i really want to get through this and develop this skill because there is PCB design involved in this class and our project
- attended mandatory lab section
- had an initial lab meeting with phil walter to improving our PDSRs and functional specifications
- i worked on updating pdsrs with stanley by not just stating the hardware components used, but what they want to accomplish
- ie. we went from "device" to "ability for device to do this" and applied that principle to all of our PDSRs
- stanley and i then look at a functional description example regarding a multi game controller and we notice that it starts with a sort of user manual and then the purpose of each component
- we noticed that original funcitonal description only has the user manual so we added more details regarding that and talked about the purpose of each hardware component that we were using
- while writing functional description, we found more hardware PSDRs (including the USB interfacing that we left out) and pretty much phased out all of the software ones
- end of lab section, talked to phil walter about psdrs and more were approved, only list the 5 hardest ones and don't put essentially functionality in stretch psdrs
- learned from TA / mentor that our journals were too resume like and instead should just be a sort of diary that documents everything we do including our thoughts and not just what we did and accomplished
- followed blinky kicad tutorial via this playlist: https://www.youtube.com/watch?v=iTyi3RvNoB0&list=PLy2022BX6Esr6yxwDzhqYZyuuenJE2s5B
- youtube video used ? key to pull up menu of hotkeys, but my kicad version uses ctrl + f1
- we setup schematic and pcb files but no development, simply the environment with these files
- making a custom part, a 7555 timer for the video tutorial; timer is for periodic high and low voltage to allow flashing LED
- video wants to use lower voltage timer so 7 555 timer is chosen
- hotkeys i learned: P key pulls up power elements, esc takes you to cursor mode, M when hovering over component moves item, R for rotate, A to pull up libraries of other components
- you are going to pull up libraries of component list when cursor is accompanied with op amp symbol and you click on the schematic editor
- here is component list:
- note the tone of abbreviations when looking at passive elements in device library
- to make your own symbol, go to library editor and video shows different UI but when loading a component you want to edit, modern version allows you to just select from the sidebar (we will both edit the resistor)
- i eventually made my 7555 timer as well as the schematic diagram to blink an led
- from the very first video that I watched, i'm assuming pcb editing is next
- discussing with teammates regarding the low grade of our first journal
- could be due to lack of detail
- but why Stanley's grade so low when he has so many images and bullet points?
- will ask TA / mentor next week
- collaborating with teammates to complete functionality assignment
- key points:
- still plan on ensuring our encrypted thumb drive's main goal is to allow different individuals to access their own files despite sharing the device
- wrote economic constraint, drew FBD of device, and wrote mechanical constraints with teammates
- determined economic constraint via class requirements as well as looking at market prices derived from amazon.com, the most common place for people to shop for items
- mechanical constraint determined via ideal scenario of a pocket sized device and we want to make sure device can actually be inserted into computer or else it's pointless if a mechanical aspect impedes it
- doing kicad tutorial today via this video: https://www.youtube.com/watch?v=SFJRHFMOhQA
- key points:
- assemble circuit schematic in schematic editor; get all necessary parts and make sure all pinouts are correct
- note that all the wiring done in the circuit schematic is not the final layout on PCB
- after identifying key components and wiring in circuit schematic editor, move on to PCB editor
- can utilize viewer to see what board can potential look like given layour on PCB editor
- on PCB editor you can drag out your cluster of components into different spots and light blue lines can show what needs to be wired up
- use a pencil icon to draw connections between components
- order design via PCB way
- YouTube video was only 44 minutes but spent almost double the time due to trying to follow along
- not the most simple introduction but gives good idea of the PCB design process
- found a blinky kicad tutorial that is much shorter, going to try that next time
- blinky kicad tutorial has something simple that I can follow along with more easily and use less time
- MAN lab meeting with Prof Walter
- @ 12:55 mikroe-4265 with datasheet https://www.mikroe.com/brochure?ref=MIKROE-4265
- @ 1:22 done reading, very interesting capacitive fingerprint sensor as it also has optical components: price is only $7 but not many tutorials on how to use this device
- once again honestly probably doesn't matter because we just need a simple display; no need for anything fancy like touch screen
- 1:32 reading into STM32L4 series MCUs
- has to meet 12 MHz clock requirements, most likely an external crystal clock
- may also look into on chip memory for size of code etc
- nucleo-l412kb looks ok, l432kc looks ok as well
- i wonder for mcus that interface with slow 32 khz crystal oscillators, if a faster one can be used; mcus cannot speed up clocks. they have a maximum speed and you have to scale your way down
- the 32 khz crystal oscillator is a common feature, not a board feature
- other MCUs (with the boards) include board specific features (such as the 2 listed above) including but not limited to 24 MHz - 48 MHz
- if the MCU itself can handle a high clock speed, can a higher crystal oscillator still hooked up even if its not a common feature on the MCU?
- @1:57 UPDATE we found out we got scammed by the $7.00 fingerprint sensor because it is merely a fingerprint sensor adapter (realization for 5 min)
- back to 1:32 progress: found stm32 microcontrollers that have usb on-the-go and i learned that means they can act as hosts for other devices to attach to it via USB
-
around 2:10 ish to 2:24 discussed psdr and functionality with prof walter and TAs
- need more descriptions and detail
- flash is block storage whereas eeprom is bytes, but has less storage
- consider looking at MCU with USB built in because UART is slower
- need to find suitable MCU asap & flash chip with good bandwidth (want to reduce delays because USB has strict timing specifications)
- *note to self* plan to learn kicad and do some tutorials after lab section today
- adafruit options for displays for our project:
- found monochrome 128x32 pixel i2c oled display
- found monochrome 128x64 pixel i2c / spi oled display
- found grayscale 1.5" 128x128 graphic display
- found 1.8" color tft lcd display st7735r
- once again honestly probably doesn't matter because we just need a simple display; no need for anything fancy like touch screen
- however, flexibility is preferred in case some pins we use on a microcontroller that we eventually pick has conflicts, a peripheral with multiple communication protocol abilities would be helpful
- looking at various websites including amazon, gettobyte, adafruit
- gettobyte as 4x4 similar to ece362 kit - not many cons other than one extra pin which takes up space but pro is low learning curve for integration into design
- adafruit has a bigger variety of selections including a 3x4 keypad with 7 pins: advantage is less pins and less keys to deal with for physical constraints but cons include lower variety of password choices
- amazon has immense variety: 5 pin touchpad with 3x4 keys which is good for less pins and physical constraint but may have complexity for engineering design
- has metal fingerprint door access but it's an entire product within itself and would not qualify as a psdr; gives into potential idea of using rfid instead of fingerprint
- haven't found wiring diagram for gettobyte but gonna assume it's similar to ece362 kit; adafruit 3x4 includes wiring diagram which can aid for engineering design
- honestly probably doesn't matter because we just need a simple keypad that has buttons for numbers and stuff and maybe some letters as well
- helped determine roles in final project proposal (got assigned systems lead)
- discussed potential microcontrollers for project design with TAs
- took a tour around facility with instructor and learned locations of shared spaces, cabinets, and other materials
- completed PSDR section of final project proposal
- completed member expertise for self
- filled out member3.html and journal3.html for course website
- found out that firefox loads the website better than chrome
- learned how to unfollow host in VSCode liveshare using ctrl + alt + f on windows
- discovered inability to upload photo properly on VSCode liveshare if uploader is not the host
Entry 2: ----------------------------------------------------------------
Date: March 12thStart Time: 12:30pm
Duration: 2 hour
Entry 1: ----------------------------------------------------------------
Date: March 10thStart Time: 3:20pm
Duration: 1.5 hour
Project Journal for Brandon
=============== Week 8: =================
Entry 6: ----------------------------------------------------------------
Date: March 7thStart Time: 1:45pm
Duration: 2.25 hour
Entry 5: ----------------------------------------------------------------
Date: March 6thStart Time: 2:00pm
Duration: 2.75 hour
Entry 4: ----------------------------------------------------------------
Date: March 5thStart Time: 1:00pm
Duration: 6.75 hour
Entry 3: ----------------------------------------------------------------
Date: March 4thStart Time: 12:30pm
Duration: 2 hour
Entry 2: ----------------------------------------------------------------
Date: March 3rdStart Time: 9:45pm
Duration: 2.25 hour
Entry 1: ----------------------------------------------------------------
Date: March 2ndStart Time: 7:27pm
Duration: 2 hours
Project Journal for Brandon
=============== Week 7: =================
Entry 4: ----------------------------------------------------------------
Date: February 28thStart Time: 5:15pm
Duration: 0.75 hour
Entry 3: ----------------------------------------------------------------
Date: February 26stStart Time: 12:30pm
Duration: 2.5 hour
Entry 2: -----------------------------------------------------------------
Date: February 24thStart Time: 2:15pm
Duration: 3 hour
Entry 1: ----------------------------------------------------------------
Date: February 22stStart Time: 10:00pm
Duration: 2 hour
=============== Week 6: =================
Entry 4: -----------------------------------------------------------------
Date: February 21stStart Time: 2:15pm
Duration: 3.5 hour
Entry 3: -----------------------------------------------------------------
Date: February 20thStart Time: 1:15pm
Duration: 0.75 hour
Entry 2: -----------------------------------------------------------------
Date: February 19thStart Time: 12:30pm
Duration: 3 hour
Entry 1: -----------------------------------------------------------------
Date: February 18thStart Time: 1:00pm
Duration: 2.25 hour
=============== Week 5: =================
Entry 3: -----------------------------------------------------------------
Date: February 14thStart Time: 1:00pm
Duration: 5.5 hour
Entry 2: -----------------------------------------------------------------
Date: February 12thStart Time: 12:30am
Duration: 2 hour
Entry 1: -----------------------------------------------------------------
Date: February 12thStart Time: 11:00am
Duration: 1 hour
=============== Week 4: =================
Entry 3: -----------------------------------------------------------------
Date: February 6thStart Time: 8:30pm
Duration: 2.5 hours
Entry 2: -----------------------------------------------------------------
Date: February 5thStart Time: 12:30pm
Duration: 2 hours
Entry 1: -----------------------------------------------------------------
Date: February 1stStart Time: 8:00pm
Duration: 3 hours
=============== Week 3: =================
Entry 3: -----------------------------------------------------------------
Date: January 31thStart Time: 4:30pm
Duration: 3 hours
Entry 3: -----------------------------------------------------------------
Date: January 29thStart Time: 12:30pm
Duration: 2 hours
Entry 2: -----------------------------------------------------------------
Date: January 28thStart Time: 8:30pm
Duration: 1.5 hours
Entry 1: -----------------------------------------------------------------
Date: January 25thStart Time: 3:30pm
Duration: 2 hours
=============== Week 2: =================
Entry 4: -----------------------------------------------------------------
Date: January 24thStart Time: 1:00pm
Duration: 1.5 hours
Entry 3: -----------------------------------------------------------------
Date: January 22thStart Time: 12:30pm
Duration: 2 hours
Entry 2: -----------------------------------------------------------------
Date: January 22thStart Time: 11:45am
Duration: 0.5 hours
Entry 1: -----------------------------------------------------------------
Date: January 20thStart Time: 10:10pm
Duration: 0.5 hours
=============== Week 1: =================
Entry 1: -----------------------------------------------------------------
Date: January 15thStart Time: 12:30pm
Duration: 3 hours









































